Make ESLint configuration compatible with Pronto
pronto-eslint depends on eslintrb, which expects the `.eslintrc` file in JSON format. So we're migrating the `.eslintrc.yml` file to JSON and introducing a symbolic link so the `.eslintrc` file points to `.eslintrc.json`. We could also use pronto-eslint_npm, but unfortunately it's not maintained anymore and the latest version is not compatible with Pronto 0.11.
This commit is contained in:
115
.eslintrc.json
Normal file
115
.eslintrc.json
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": false
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"$": "readonly",
|
||||
"App": "readonly",
|
||||
"AmsifySuggestags": "readonly",
|
||||
"annotator": "readonly",
|
||||
"c3": "readonly",
|
||||
"CKEDITOR": "readonly",
|
||||
"L": "readonly",
|
||||
"Turbolinks": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 5
|
||||
},
|
||||
"rules": {
|
||||
"array-bracket-spacing": "error",
|
||||
"array-callback-return": "error",
|
||||
"block-spacing": "error",
|
||||
"brace-style": "error",
|
||||
"comma-spacing": "error",
|
||||
"computed-property-spacing": "error",
|
||||
"curly": "error",
|
||||
"dot-notation": "error",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"always",
|
||||
{
|
||||
"null": "ignore"
|
||||
}
|
||||
],
|
||||
"func-call-spacing": "error",
|
||||
"indent": [
|
||||
"error",
|
||||
2
|
||||
],
|
||||
"key-spacing": "error",
|
||||
"keyword-spacing": "error",
|
||||
"linebreak-style": "error",
|
||||
"lines-between-class-members": "error",
|
||||
"max-len": [
|
||||
"warn",
|
||||
{
|
||||
"code": 110
|
||||
}
|
||||
],
|
||||
"no-array-constructor": "error",
|
||||
"no-console": "error",
|
||||
"no-multi-spaces": "error",
|
||||
"no-multiple-empty-lines": [
|
||||
"error",
|
||||
{
|
||||
"max": 1
|
||||
}
|
||||
],
|
||||
"no-param-reassign": "error",
|
||||
"no-shadow": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-tabs": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-void": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always",
|
||||
{
|
||||
"objectsInObjects": false
|
||||
}
|
||||
],
|
||||
"padded-blocks": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"double",
|
||||
{
|
||||
"avoidEscape": true
|
||||
}
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"semi-spacing": "error",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"space-in-parens": "error",
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": [
|
||||
"error",
|
||||
"always",
|
||||
{
|
||||
"markers": [
|
||||
"="
|
||||
],
|
||||
"exceptions": [
|
||||
"-"
|
||||
]
|
||||
}
|
||||
],
|
||||
"strict": "error",
|
||||
"switch-colon-spacing": "error",
|
||||
"yoda": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
env:
|
||||
browser: true
|
||||
es6: false
|
||||
extends: "eslint:recommended"
|
||||
globals:
|
||||
$: readonly
|
||||
App: readonly
|
||||
AmsifySuggestags: readonly
|
||||
annotator: readonly
|
||||
c3: readonly
|
||||
CKEDITOR: readonly
|
||||
L: readonly
|
||||
Turbolinks: readonly
|
||||
parserOptions:
|
||||
ecmaVersion: 5
|
||||
rules:
|
||||
array-bracket-spacing: error
|
||||
array-callback-return: error
|
||||
block-spacing: error
|
||||
brace-style: error
|
||||
comma-spacing: error
|
||||
computed-property-spacing: error
|
||||
curly: error
|
||||
dot-notation: error
|
||||
eol-last: error
|
||||
eqeqeq:
|
||||
- error
|
||||
- always
|
||||
- "null": ignore
|
||||
func-call-spacing: error
|
||||
indent:
|
||||
- error
|
||||
- 2
|
||||
key-spacing: error
|
||||
keyword-spacing: error
|
||||
linebreak-style: error
|
||||
lines-between-class-members: error
|
||||
max-len:
|
||||
- warn
|
||||
- code: 110
|
||||
no-array-constructor: error
|
||||
no-console: error
|
||||
no-multi-spaces: error
|
||||
no-multiple-empty-lines:
|
||||
- error
|
||||
- max: 1
|
||||
no-param-reassign: error
|
||||
no-shadow: error
|
||||
no-spaced-func: error
|
||||
no-tabs: error
|
||||
no-trailing-spaces: error
|
||||
no-void: error
|
||||
no-whitespace-before-property: error
|
||||
object-curly-spacing:
|
||||
- error
|
||||
- always
|
||||
- objectsInObjects: false
|
||||
padded-blocks:
|
||||
- error
|
||||
- never
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
- avoidEscape: true
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
semi-spacing: error
|
||||
space-before-blocks: error
|
||||
space-before-function-paren:
|
||||
- error
|
||||
- never
|
||||
space-in-parens: error
|
||||
space-infix-ops: error
|
||||
space-unary-ops: error
|
||||
spaced-comment:
|
||||
- error
|
||||
- always
|
||||
- markers:
|
||||
- "="
|
||||
exceptions:
|
||||
- "-"
|
||||
strict: error
|
||||
switch-colon-spacing: error
|
||||
yoda: error
|
||||
Reference in New Issue
Block a user