chore: use root .prettierignore (#1285)

* use root .prettierignore for fix and check
This commit is contained in:
Sasha 2023-04-03 23:39:59 +02:00 committed by GitHub
parent 7075f10780
commit 6abee4880f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 17 additions and 76 deletions

9
.prettierignore Normal file
View File

@ -0,0 +1,9 @@
.github
.husky
.vscode
nwaku
*/**/build
*/**/bundle
*/**/dist
*/**/node_modules
*/**/CHANGELOG.md

View File

@ -20,9 +20,12 @@
"build": "npm run build --workspaces --if-present", "build": "npm run build --workspaces --if-present",
"build:esm": "npm run build:esm --workspaces --if-present", "build:esm": "npm run build:esm --workspaces --if-present",
"size": "npm run build && size-limit", "size": "npm run build && size-limit",
"fix": "npm run fix --workspaces --if-present", "fix": "run-s fix:*",
"fix:lint": "npm run fix:lint --workspaces --if-present", "fix:workspaces": "npm run fix --workspaces --if-present",
"check": "npm run check --workspaces --if-present", "fix:prettier": "prettier ./packages --write",
"check": "run-s check:*",
"check:workspaces": "npm run check --workspaces --if-present",
"check:prettier": "prettier ./packages --list-different",
"check:ws": "[ $(ls -1 ./packages|wc -l) -eq $(cat package.json | jq '.workspaces | length') ] || exit 1 # check no packages left behind", "check:ws": "[ $(ls -1 ./packages|wc -l) -eq $(cat package.json | jq '.workspaces | length') ] || exit 1 # check no packages left behind",
"test": "npm run test --workspaces --if-present", "test": "npm run test --workspaces --if-present",
"test:browser": "npm run test:browser --workspaces --if-present", "test:browser": "npm run test:browser --workspaces --if-present",

View File

@ -9,10 +9,8 @@
"scripts": { "scripts": {
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix",
"fix:prettier": "prettier . --write",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint .", "check:lint": "eslint ."
"check:prettier": "prettier . --list-different"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -56,7 +56,6 @@
"build:esm": "tsc", "build:esm": "tsc",
"build:bundle": "rollup --config rollup.config.js", "build:bundle": "rollup --config rollup.config.js",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src *.js --fix", "fix:lint": "eslint src *.js --fix",
"pretest": "run-s pretest:*", "pretest": "run-s pretest:*",
"pretest:1-init-git-submodules": "[ -f '../../nwaku/build/wakunode2' ] || git submodule update --init --recursive", "pretest:1-init-git-submodules": "[ -f '../../nwaku/build/wakunode2' ] || git submodule update --init --recursive",
@ -66,7 +65,6 @@
"check": "run-s check:*", "check": "run-s check:*",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"check:lint": "eslint src *.js", "check:lint": "eslint src *.js",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"test": "run-s test:*", "test": "run-s test:*",
"test:node": "TS_NODE_PROJECT=./tsconfig.dev.json mocha", "test:node": "TS_NODE_PROJECT=./tsconfig.dev.json mocha",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -36,11 +36,9 @@
"build:esm": "tsc", "build:esm": "tsc",
"build:bundle": "rollup --config rollup.config.js", "build:bundle": "rollup --config rollup.config.js",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src *.js --fix", "fix:lint": "eslint src *.js --fix",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint src *.js", "check:lint": "eslint src *.js",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"prepublish": "npm run build", "prepublish": "npm run build",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -43,11 +43,9 @@
"build:esm": "tsc", "build:esm": "tsc",
"build:bundle": "rollup --config rollup.config.js", "build:bundle": "rollup --config rollup.config.js",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src *.js --fix", "fix:lint": "eslint src *.js --fix",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint src --ext .ts", "check:lint": "eslint src --ext .ts",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"prepublish": "npm run build", "prepublish": "npm run build",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -36,11 +36,9 @@
"build:esm": "tsc", "build:esm": "tsc",
"build:bundle": "rollup --config rollup.config.js", "build:bundle": "rollup --config rollup.config.js",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src *.js --fix", "fix:lint": "eslint src *.js --fix",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint src --ext .ts", "check:lint": "eslint src --ext .ts",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"test": "run-s test:*", "test": "run-s test:*",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -35,11 +35,9 @@
"build": "run-s build:**", "build": "run-s build:**",
"build:esm": "tsc", "build:esm": "tsc",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src --fix", "fix:lint": "eslint src --fix",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint src", "check:lint": "eslint src",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"prepublish": "npm run build", "prepublish": "npm run build",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -53,11 +53,9 @@
"build:esm": "tsc", "build:esm": "tsc",
"build:bundle": "rollup --config rollup.config.js", "build:bundle": "rollup --config rollup.config.js",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src *.js --fix", "fix:lint": "eslint src *.js --fix",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint src *.js", "check:lint": "eslint src *.js",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"test": "run-s test:*", "test": "run-s test:*",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -36,11 +36,9 @@
"build:esm": "tsc", "build:esm": "tsc",
"build:bundle": "rollup --config rollup.config.js", "build:bundle": "rollup --config rollup.config.js",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src *.js --fix", "fix:lint": "eslint src *.js --fix",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint src *.js", "check:lint": "eslint src *.js",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"prepublish": "npm run build", "prepublish": "npm run build",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -38,9 +38,7 @@
"proto": "rimraf src/lib/*.ts; protons src/lib/*.proto", "proto": "rimraf src/lib/*.ts; protons src/lib/*.proto",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"prepublish": "npm run build", "prepublish": "npm run build",
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build", "reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build"
"fix": "run-s fix:*",
"fix:prettier": "prettier . --write"
}, },
"engines": { "engines": {
"node": ">=16" "node": ">=16"

View File

@ -1,4 +0,0 @@
build
bundle
dist
node_modules

View File

@ -36,7 +36,6 @@
"build": "run-s build:**", "build": "run-s build:**",
"build:esm": "tsc", "build:esm": "tsc",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src tests --fix", "fix:lint": "eslint src tests --fix",
"pretest": "run-s pretest:*", "pretest": "run-s pretest:*",
"pretest:1-init-git-submodules": "[ -f '../../nwaku/build/wakunode2' ] || git submodule update --init --recursive", "pretest:1-init-git-submodules": "[ -f '../../nwaku/build/wakunode2' ] || git submodule update --init --recursive",
@ -44,7 +43,6 @@
"nwaku:build": "(PROC=$(nproc --all 2>/dev/null || echo 2); cd ../../nwaku; make -j$PROC update; NIMFLAGS=\"-d:chronicles_colors=off\" make -j$PROC wakunode2)", "nwaku:build": "(PROC=$(nproc --all 2>/dev/null || echo 2); cd ../../nwaku; make -j$PROC update; NIMFLAGS=\"-d:chronicles_colors=off\" make -j$PROC wakunode2)",
"nwaku:force-build": "(cd ../../nwaku && rm -rf ./build/ ./vendor) && run-s nwaku:build", "nwaku:force-build": "(cd ../../nwaku && rm -rf ./build/ ./vendor) && run-s nwaku:build",
"check": "run-s check:*", "check": "run-s check:*",
"check:prettier": "prettier . --list-different",
"check:lint": "eslint src tests", "check:lint": "eslint src tests",
"check:spelling": "cspell \"{README.md,{tests,src}/**/*.ts}\"", "check:spelling": "cspell \"{README.md,{tests,src}/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",

View File

@ -1,5 +0,0 @@
build
bundle
dist
node_modules
CHANGELOG.md

View File

@ -53,11 +53,9 @@
"build:esm": "tsc", "build:esm": "tsc",
"build:bundle": "rollup --config rollup.config.js", "build:bundle": "rollup --config rollup.config.js",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src *.js --fix", "fix:lint": "eslint src *.js --fix",
"check": "run-s check:*", "check": "run-s check:*",
"check:lint": "eslint src *.js", "check:lint": "eslint src *.js",
"check:prettier": "prettier . --list-different",
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"", "check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json", "check:tsc": "tsc -p tsconfig.dev.json",
"prepublish": "npm run build", "prepublish": "npm run build",