Add and configure ESLint
This commit is contained in:
parent
3dffd42ba1
commit
737541d3da
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"webextensions": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 12,
|
||||||
|
"sourceType": "script"
|
||||||
|
},
|
||||||
|
"root": true,
|
||||||
|
"parser": "@babel/eslint-parser",
|
||||||
|
"rules": {
|
||||||
|
"curly": ["error", "all"],
|
||||||
|
"eqeqeq": ["error", "always"],
|
||||||
|
"indent": [
|
||||||
|
"error",
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"linebreak-style": [
|
||||||
|
"error",
|
||||||
|
"unix"
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"error",
|
||||||
|
"single"
|
||||||
|
],
|
||||||
|
"semi": [
|
||||||
|
"error",
|
||||||
|
"never",
|
||||||
|
{
|
||||||
|
"beforeStatementContinuationChars": "never"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"strict": [
|
||||||
|
"error",
|
||||||
|
"global"
|
||||||
|
],
|
||||||
|
"yoda": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
* text=auto
|
||||||
|
*.css text eol=lf
|
||||||
|
*.editorconfig text eol=lf
|
||||||
|
*.html text eol=lf
|
||||||
|
*.js text eol=lf
|
||||||
|
*.json text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
|
*.txt text eol=lf
|
||||||
|
*.png binary
|
|
@ -1,2 +1,3 @@
|
||||||
|
/node_modules
|
||||||
/web-ext-artifacts
|
/web-ext-artifacts
|
||||||
/.web-extension-id
|
/.web-extension-id
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"babel": {},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.16.0",
|
||||||
|
"@babel/eslint-parser": "^7.16.0",
|
||||||
|
"eslint": "^8.2.0"
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue