|
| 1 | +"use strict"; |
| 2 | + |
| 3 | +module.exports = { |
| 4 | + parserOptions: { |
| 5 | + sourceType: "script" |
| 6 | + }, |
| 7 | + extends: ["plugin:itgalaxy/esnext", "plugin:itgalaxy/node"], |
| 8 | + overrides: [ |
| 9 | + // Source |
| 10 | + { |
| 11 | + // Exclude nested tests |
| 12 | + excludedFiles: ["**/__tests__/**/*", "**/__mocks__/**/*", "**/*.md"], |
| 13 | + files: ["src/**/*"], |
| 14 | + parserOptions: { |
| 15 | + sourceType: "module" |
| 16 | + }, |
| 17 | + rules: { |
| 18 | + // Allow to use ECMAScript 6 modules because we use `babel` |
| 19 | + "node/no-unsupported-features/es-syntax": "off" |
| 20 | + } |
| 21 | + }, |
| 22 | + |
| 23 | + // Jest |
| 24 | + { |
| 25 | + extends: ["plugin:itgalaxy/jest"], |
| 26 | + excludedFiles: ["**/*.md"], |
| 27 | + files: ["**/__tests__/**/*", "**/__mocks__/**/*"], |
| 28 | + parserOptions: { |
| 29 | + sourceType: "module" |
| 30 | + }, |
| 31 | + rules: { |
| 32 | + // Allow to use `console` (example - `mocking`) |
| 33 | + "no-console": "off", |
| 34 | + // Allow to use ECMAScript 6 modules because we use `babel` |
| 35 | + "node/no-unsupported-features/es-syntax": "off" |
| 36 | + } |
| 37 | + }, |
| 38 | + |
| 39 | + // Markdown |
| 40 | + { |
| 41 | + extends: ["plugin:itgalaxy/markdown"], |
| 42 | + files: ["**/*.md"], |
| 43 | + parserOptions: { |
| 44 | + sourceType: "module", |
| 45 | + ecmaFeatures: { |
| 46 | + impliedStrict: true |
| 47 | + } |
| 48 | + }, |
| 49 | + rules: { |
| 50 | + strict: "off", |
| 51 | + "no-undef": "off", |
| 52 | + "no-unused-vars": "off", |
| 53 | + "no-process-env": "off", |
| 54 | + "no-process-exit": "off", |
| 55 | + "no-console": "off", |
| 56 | + "import/no-unresolved": "off", |
| 57 | + "import/extensions": "off", |
| 58 | + "node/no-unpublished-require": "off", |
| 59 | + "node/no-unpublished-import": "off", |
| 60 | + "node/no-unsupported-features/es-syntax": "off" |
| 61 | + } |
| 62 | + } |
| 63 | + ], |
| 64 | + root: true |
| 65 | +}; |
0 commit comments