1
0
Fork 0

Add and configure ESLint

This commit is contained in:
Krzysztof Sikorski 2021-11-07 23:05:57 +01:00
parent 3dffd42ba1
commit 737541d3da
Signed by: krzysztof-sikorski
GPG Key ID: 4EB564BD08FE8476
5 changed files with 2866 additions and 0 deletions

45
.eslintrc.json Normal file
View File

@ -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"
]
}
}

9
.gitattributes vendored Normal file
View File

@ -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
.gitignore vendored
View File

@ -1,2 +1,3 @@
/node_modules
/web-ext-artifacts
/.web-extension-id

2803
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

8
package.json Normal file
View File

@ -0,0 +1,8 @@
{
"babel": {},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.0",
"eslint": "^8.2.0"
}
}