Files
nairobi/.eslintrc.json
Javi Martín 5d4c5a12a8 Add ESLint as a development dependency
Since now we aren't just using ESLint in the context of a pull request
(with pronto-eslint), we're also adding the `ignorePatterns` option so
it ignores third-party files.

Note we're using ESLint 8 because ESLint 9 doesn't support our
`.eslintrc` configuration file, which we need because it's required by
pronto-eslint. However, when running pronto-eslint, we're using ESLint 6
(I think); this means that now the eslint command we run in development
and the one run by pronto might behave differently, particularly if we
add rules that have been introduced in ESLint 7 or 8. For now, since we
generated the `.eslintrc` file using ESLint 6.0.1, everything works as
expected in both situations.
2024-06-18 18:27:32 +02:00

117 lines
2.2 KiB
JSON

{
"ignorePatterns": [
"app/assets/javascripts/ckeditor/config.js",
"node_modules/",
"vendor/"
],
"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"
}
],
"indent": [
"error",
2
],
"key-spacing": "error",
"keyword-spacing": "error",
"linebreak-style": "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-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",
"yoda": "error"
}
}