|
| 1 | +'use strict'; |
1 | 2 | module.exports = { |
2 | | - "extends": ["ash-nazg/sauron-node"], |
3 | | - parser: 'babel-eslint', |
4 | | - "settings": { |
5 | | - "polyfills": [ |
6 | | - "Array.isArray", |
7 | | - "console", |
8 | | - "Date.now", |
9 | | - "document.head", |
10 | | - "document.querySelector", |
11 | | - "JSON", |
12 | | - "Object.keys", |
13 | | - 'Object.values', |
14 | | - "XMLHttpRequest" |
15 | | - ] |
16 | | - }, |
17 | | - "overrides": [ |
18 | | - { |
19 | | - "files": ["src/jsonpath.js", "test-helpers/node-env.js"], |
20 | | - // Apparent bug with `overrides` necessitating this |
21 | | - "globals": { |
22 | | - "require": "readonly", |
23 | | - "run": "readonly", |
24 | | - "module": "readonly" |
25 | | - }, |
26 | | - rules: { |
27 | | - "node/no-unsupported-features/es-syntax": ["error", { |
28 | | - ignores: ['regexpNamedCaptureGroups', 'modules', 'dynamicImport'] |
29 | | - }] |
30 | | - } |
31 | | - }, |
32 | | - { |
33 | | - "files": ["*.md"], |
34 | | - "rules": { |
35 | | - "import/unambiguous": 0, |
36 | | - "import/no-commonjs": 0, |
37 | | - "import/no-unresolved": ["error", {"ignore": ["jsonpath-plus"]}], |
38 | | - "no-undef": 0, |
39 | | - "no-unused-vars": ["error", { |
40 | | - "varsIgnorePattern": "json|result" |
41 | | - }], |
42 | | - "node/no-missing-require": ["error", { |
43 | | - "allowModules": ["jsonpath-plus"] |
44 | | - }], |
45 | | - "node/no-missing-import": ["error", { |
46 | | - "allowModules": ["jsonpath-plus"] |
47 | | - }] |
48 | | - } |
49 | | - }, |
50 | | - { |
51 | | - "files": ["test/**"], |
52 | | - "extends": [ |
53 | | - "plugin:chai-expect/recommended", |
54 | | - "plugin:chai-friendly/recommended" |
55 | | - ], |
56 | | - "globals": { |
57 | | - "assert": "readonly", |
58 | | - "expect": "readonly", |
59 | | - "jsonpath": "readonly" |
60 | | - }, |
61 | | - "env": {"mocha": true}, |
62 | | - "rules": { |
63 | | - "quotes": 0, |
64 | | - "import/unambiguous": 0, |
65 | | - // Todo: Reenable |
66 | | - "max-len": 0 |
67 | | - } |
68 | | - } |
69 | | - ], |
70 | | - "rules": { |
71 | | - "indent": ["error", 4, {"outerIIFEBody": 0}], |
72 | | - "promise/prefer-await-to-callbacks": 0, |
73 | | - "quote-props": 0, |
74 | | - "require-jsdoc": 0, |
75 | | - // Reenable when no longer having problems |
76 | | - "unicorn/no-unsafe-regex": 0 |
77 | | - } |
| 3 | + 'extends': ['ash-nazg/sauron-node'], |
| 4 | + parser: 'babel-eslint', |
| 5 | + 'settings': { |
| 6 | + 'polyfills': [ |
| 7 | + 'Array.isArray', |
| 8 | + 'console', |
| 9 | + 'Date.now', |
| 10 | + 'document.head', |
| 11 | + 'document.querySelector', |
| 12 | + 'JSON', |
| 13 | + 'Number.isFinite', |
| 14 | + 'Number.parseInt', |
| 15 | + 'Object.keys', |
| 16 | + 'Object.values', |
| 17 | + 'XMLHttpRequest' |
| 18 | + ] |
| 19 | + }, |
| 20 | + 'overrides': [ |
| 21 | + { |
| 22 | + files: ['.eslintrc.js', '.mocharc.js'], |
| 23 | + extends: ['plugin:node/recommended-script'], |
| 24 | + rules: { |
| 25 | + 'import/no-commonjs': 'off', |
| 26 | + 'import/ambiguous': 'off' |
| 27 | + } |
| 28 | + }, |
| 29 | + { |
| 30 | + 'files': ['src/jsonpath.js', 'test-helpers/node-env.js'], |
| 31 | + // Apparent bug with `overrides` necessitating this |
| 32 | + 'globals': { |
| 33 | + 'require': 'readonly', |
| 34 | + 'run': 'readonly', |
| 35 | + 'module': 'readonly' |
| 36 | + }, |
| 37 | + rules: { |
| 38 | + 'node/no-unsupported-features/es-syntax': ['error', { |
| 39 | + ignores: [ |
| 40 | + 'regexpNamedCaptureGroups', 'modules', 'dynamicImport' |
| 41 | + ] |
| 42 | + }] |
| 43 | + } |
| 44 | + }, |
| 45 | + { |
| 46 | + 'files': ['*.md'], |
| 47 | + 'rules': { |
| 48 | + 'import/unambiguous': 0, |
| 49 | + 'import/no-commonjs': 0, |
| 50 | + 'import/no-unresolved': ['error', { |
| 51 | + 'ignore': ['jsonpath-plus'] |
| 52 | + }], |
| 53 | + 'no-undef': 0, |
| 54 | + 'no-unused-vars': ['error', { |
| 55 | + 'varsIgnorePattern': 'json|result' |
| 56 | + }], |
| 57 | + 'node/no-missing-require': ['error', { |
| 58 | + 'allowModules': ['jsonpath-plus'] |
| 59 | + }], |
| 60 | + 'node/no-missing-import': ['error', { |
| 61 | + 'allowModules': ['jsonpath-plus'] |
| 62 | + }] |
| 63 | + } |
| 64 | + }, |
| 65 | + { |
| 66 | + 'files': ['test/**'], |
| 67 | + 'extends': [ |
| 68 | + 'plugin:chai-expect/recommended', |
| 69 | + 'plugin:chai-friendly/recommended' |
| 70 | + ], |
| 71 | + 'globals': { |
| 72 | + 'assert': 'readonly', |
| 73 | + 'expect': 'readonly', |
| 74 | + 'jsonpath': 'readonly' |
| 75 | + }, |
| 76 | + 'env': {'mocha': true}, |
| 77 | + 'rules': { |
| 78 | + 'quotes': 0, |
| 79 | + 'import/unambiguous': 0, |
| 80 | + // Todo: Reenable |
| 81 | + 'max-len': 0 |
| 82 | + } |
| 83 | + } |
| 84 | + ], |
| 85 | + 'rules': { |
| 86 | + 'indent': ['error', 4, {'outerIIFEBody': 0}], |
| 87 | + 'promise/prefer-await-to-callbacks': 0, |
| 88 | + 'quote-props': 0, |
| 89 | + 'require-jsdoc': 0, |
| 90 | + // Reenable when no longer having problems |
| 91 | + 'unicorn/no-unsafe-regex': 0 |
| 92 | + } |
78 | 93 | }; |
0 commit comments