build: update JS linting standards
This commit is contained in:
parent
c46638cf3e
commit
73b39f361d
5 changed files with 2514 additions and 25 deletions
12
.eslintrc.js
12
.eslintrc.js
|
@ -1,12 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
env: {
|
|
||||||
browser: true,
|
|
||||||
jquery: true,
|
|
||||||
es6: true
|
|
||||||
},
|
|
||||||
extends: [
|
|
||||||
'wordpress',
|
|
||||||
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
|
|
||||||
],
|
|
||||||
rules: {},
|
|
||||||
};
|
|
14
.eslintrc.json
Normal file
14
.eslintrc.json
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"jquery": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"plugin:@wordpress/eslint-plugin/esnext",
|
||||||
|
"plugin:@wordpress/eslint-plugin/jsdoc",
|
||||||
|
"plugin:@wordpress/eslint-plugin/i18n",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
|
"rules": {}
|
||||||
|
}
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -79,7 +79,7 @@ tmp/
|
||||||
|
|
||||||
!.editorconfig
|
!.editorconfig
|
||||||
!.phpcs.xml.dist
|
!.phpcs.xml.dist
|
||||||
!.eslintrc.js
|
!.eslintrc.json
|
||||||
!.eslintignore
|
!.eslintignore
|
||||||
!.php-commitizen.php
|
!.php-commitizen.php
|
||||||
!.prettierignore
|
!.prettierignore
|
||||||
|
|
2509
package-lock.json
generated
2509
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -41,10 +41,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@wordpress/eslint-plugin": "^9.0.3",
|
||||||
"cz-conventional-changelog": "^3.3.0",
|
"cz-conventional-changelog": "^3.3.0",
|
||||||
"eslint": "^7.24.0",
|
"eslint": "^7.24.0",
|
||||||
"eslint-config-prettier": "^8.2.0",
|
"eslint-config-prettier": "^8.2.0",
|
||||||
"eslint-config-wordpress": "^2.0.0",
|
|
||||||
"eslint-plugin-prettier": "^3.4.0",
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
"husky": "^4.3.8",
|
"husky": "^4.3.8",
|
||||||
"lint-staged": "^10.5.4",
|
"lint-staged": "^10.5.4",
|
||||||
|
|
Reference in a new issue