add ESLint
This commit is contained in:
parent
1e4d0c0a09
commit
0ee1d8cc18
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es2020": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:ava/recommended"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 11,
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"ava"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"indent": [
|
||||||
|
"error",
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"error",
|
||||||
|
"single"
|
||||||
|
],
|
||||||
|
"semi": [
|
||||||
|
"error",
|
||||||
|
"never"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -28,5 +28,6 @@ More details can be found in the [WordPress Plugin Directory](https://wordpress.
|
||||||
10. Tag the new version in `git` too.
|
10. Tag the new version in `git` too.
|
||||||
|
|
||||||
### Other commands
|
### Other commands
|
||||||
|
- Run ESLint: `npm run eslint`
|
||||||
- Run tests: `npm test`
|
- Run tests: `npm test`
|
||||||
- Delete build folder: `gulp clean`
|
- Delete build folder: `gulp clean`
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,6 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-dev": "gulp dev",
|
"build-dev": "gulp dev",
|
||||||
"build-prod": "ava && gulp prod",
|
"build-prod": "ava && gulp prod",
|
||||||
|
"eslint": "npx eslint source/**/*.js",
|
||||||
"test": "ava"
|
"test": "ava"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
|
@ -26,6 +27,8 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "^3.15.0",
|
"ava": "^3.15.0",
|
||||||
"del": "^6.0.0",
|
"del": "^6.0.0",
|
||||||
|
"eslint": "^7.23.0",
|
||||||
|
"eslint-plugin-ava": "^12.0.0",
|
||||||
"esm": "^3.2.25",
|
"esm": "^3.2.25",
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-replace": "^1.0.0",
|
"gulp-replace": "^1.0.0",
|
||||||
|
|
Loading…
Reference in New Issue