docs: Add eslint support
Official guidelines: https://eslint.org/docs/user-guide/getting-started Steps taken: npm install eslint --save-dev npx eslint --init Create .eslintignore Edit .eslintrc.js (tweaks)
This commit is contained in:
parent
b1bfff5b5a
commit
ab65bf49db
4 changed files with 1763 additions and 0 deletions
2
docs/.eslintignore
Normal file
2
docs/.eslintignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules
|
||||||
|
build
|
23
docs/.eslintrc.js
Normal file
23
docs/.eslintrc.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
commonjs: true,
|
||||||
|
es2021: true,
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
extends: ["eslint:recommended", "plugin:react/recommended"],
|
||||||
|
parserOptions: {
|
||||||
|
ecmaFeatures: {
|
||||||
|
jsx: true,
|
||||||
|
},
|
||||||
|
ecmaVersion: 2021,
|
||||||
|
sourceType: "module",
|
||||||
|
},
|
||||||
|
plugins: ["react"],
|
||||||
|
rules: {},
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: "detect",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
1734
docs/package-lock.json
generated
1734
docs/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -26,5 +26,9 @@
|
||||||
"last 1 firefox version",
|
"last 1 firefox version",
|
||||||
"last 1 safari version"
|
"last 1 safari version"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"eslint": "^7.12.0",
|
||||||
|
"eslint-plugin-react": "^7.21.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue