|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es6: true, |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + 'airbnb-base', |
| 8 | + 'plugin:unicorn/recommended', |
| 9 | + ], |
| 10 | + parserOptions: { |
| 11 | + ecmaVersion: '2022', |
| 12 | + sourceType: 'module', |
| 13 | + }, |
| 14 | + ignorePatterns: [ |
| 15 | + '!.*', |
| 16 | + '*.min.js', |
| 17 | + ], |
| 18 | + rules: { |
| 19 | + 'brace-style': ['error', '1tbs'], |
| 20 | + 'comma-dangle': ['error', { |
| 21 | + arrays: 'always-multiline', |
| 22 | + exports: 'always-multiline', |
| 23 | + functions: 'never', |
| 24 | + imports: 'always-multiline', |
| 25 | + objects: 'always-multiline', |
| 26 | + }], |
| 27 | + curly: ['error', 'all'], |
| 28 | + indent: ['error', 4, { |
| 29 | + SwitchCase: 1, |
| 30 | + }], |
| 31 | + 'linebreak-style': ['error', 'unix'], |
| 32 | + 'no-multi-spaces': ['error', { |
| 33 | + exceptions: { |
| 34 | + Property: true, |
| 35 | + VariableDeclarator: true, |
| 36 | + }, |
| 37 | + }], |
| 38 | + 'object-shorthand': ['error', 'never'], |
| 39 | + 'padding-line-between-statements': ['error', { |
| 40 | + blankLine: 'always', |
| 41 | + next: ['continue', 'break', 'export', 'return', 'throw'], |
| 42 | + prev: '*', |
| 43 | + }], |
| 44 | + 'spaced-comment': ['error', 'always', { |
| 45 | + block: { |
| 46 | + balanced: true, |
| 47 | + exceptions: ['*'], |
| 48 | + markers: ['!'], |
| 49 | + }, |
| 50 | + line: { |
| 51 | + exceptions: ['-', '+'], |
| 52 | + markers: ['/'], |
| 53 | + }, |
| 54 | + }], |
| 55 | + strict: 'off', |
| 56 | + 'wrap-iife': ['error', 'inside'], |
| 57 | + 'func-names': 'off', |
| 58 | + 'no-param-reassign': 'off', |
| 59 | + 'no-use-before-define': 'off', |
| 60 | + 'prefer-destructuring': 'off', |
| 61 | + 'unicorn/prefer-module': 'off', |
| 62 | + 'unicorn/prefer-query-selector': 'off', |
| 63 | + 'unicorn/no-array-for-each': 'off', |
| 64 | + 'unicorn/prevent-abbreviations': 'off', |
| 65 | + }, |
| 66 | + reportUnusedDisableDirectives: true, |
| 67 | + globals: { |
| 68 | + bootstrap: true, |
| 69 | + }, |
| 70 | +}; |
0 commit comments