Browse Source

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)
xmkb
innovaker 4 years ago
parent
commit
ab65bf49db
  1. 2
      docs/.eslintignore
  2. 23
      docs/.eslintrc.js
  3. 1734
      docs/package-lock.json
  4. 4
      docs/package.json

2
docs/.eslintignore

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
node_modules
build

23
docs/.eslintrc.js

@ -0,0 +1,23 @@ @@ -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

File diff suppressed because it is too large Load Diff

4
docs/package.json

@ -26,5 +26,9 @@ @@ -26,5 +26,9 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint": "^7.12.0",
"eslint-plugin-react": "^7.21.5"
}
}

Loading…
Cancel
Save