Skip to content

Commit 1708c01

Browse files
authored
chore: fix linting and formatting on npm@7 (#102)
1 parent 07d1959 commit 1708c01

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ module.exports = { extends: ['@commitlint/config-conventional'] }
6767
```
6868

6969
- Copy the `.editorconfig` and `.gitattributes` files relativity to the root of the project.
70-
- Add the following properties to the `package.json`. Please replace the `scriptsArgs` globbing expressions to match the
70+
- Add the following properties to the `package.json`. Please replace the `config` globbing expressions to match the
7171
files where the source JavaScript/Markdown/HTML/JSON/YAML files are located. `npm run format` should also be run
7272
during `npm test` and `npm run format:ci` during CI
7373
([example](https://github.com/netlify/cli/blob/master/.github/workflows/main.yml)).
@@ -78,13 +78,13 @@ module.exports = { extends: ['@commitlint/config-conventional'] }
7878
"format": "run-s format:check-fix:*",
7979
"format:ci": "run-s format:check:*",
8080
"format:check-fix:lint": "run-e format:check:lint format:fix:lint",
81-
"format:check:lint": "cross-env-shell eslint $npm_package_scriptsArgs_eslint",
82-
"format:fix:lint": "cross-env-shell eslint --fix $npm_package_scriptsArgs_eslint",
81+
"format:check:lint": "cross-env-shell eslint $npm_package_config_eslint",
82+
"format:fix:lint": "cross-env-shell eslint --fix $npm_package_config_eslint",
8383
"format:check-fix:prettier": "run-e format:check:prettier format:fix:prettier",
84-
"format:check:prettier": "cross-env-shell prettier --check $npm_package_scriptsArgs_prettier",
85-
"format:fix:prettier": "cross-env-shell prettier --write $npm_package_scriptsArgs_prettier"
84+
"format:check:prettier": "cross-env-shell prettier --check $npm_package_config_prettier",
85+
"format:fix:prettier": "cross-env-shell prettier --write $npm_package_config_prettier"
8686
},
87-
"scriptsArgs": {
87+
"config": {
8888
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,tests,.github}/**/*.{js,md,html}\" \"*.{js,md,html}\" \".*.{js,md,html}\"",
8989
"prettier": "--ignore-path .gitignore --loglevel=warn \"{src,scripts,tests,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \".*.{js,yml,json,html}\" \"!package-lock.json\""
9090
},

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"format": "run-s format:check-fix:*",
2020
"format:ci": "run-s format:check:*",
2121
"format:check-fix:lint": "./bin/run_e.js format:check:lint format:fix:lint",
22-
"format:check:lint": "cross-env-shell eslint $npm_package_scriptsArgs_eslint",
23-
"format:fix:lint": "cross-env-shell eslint --fix $npm_package_scriptsArgs_eslint",
22+
"format:check:lint": "cross-env-shell eslint $npm_package_config_eslint",
23+
"format:fix:lint": "cross-env-shell eslint --fix $npm_package_config_eslint",
2424
"format:check-fix:prettier": "./bin/run_e.js format:check:prettier format:fix:prettier",
25-
"format:check:prettier": "cross-env-shell prettier --check $npm_package_scriptsArgs_prettier",
26-
"format:fix:prettier": "cross-env-shell prettier --write $npm_package_scriptsArgs_prettier",
25+
"format:check:prettier": "cross-env-shell prettier --check $npm_package_config_prettier",
26+
"format:fix:prettier": "cross-env-shell prettier --write $npm_package_config_prettier",
2727
"test:dev": "run-s test:dev:*",
2828
"test:ci": "run-s test:ci:*",
2929
"test:dev:ava": "ava",
@@ -34,7 +34,7 @@
3434
"prepublishOnly:install": "npm ci",
3535
"prepublishOnly:test": "npm test"
3636
},
37-
"scriptsArgs": {
37+
"config": {
3838
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{bin,.github}/**/*.{js,md,html}\" \".*.js\"",
3939
"prettier": "--ignore-path .gitignore --loglevel=warn \"{bin,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \"!**/package-lock.json\" \"!CHANGELOG.md\""
4040
},

0 commit comments

Comments
 (0)