|
| 1 | +import globals from "globals"; |
| 2 | +import js from "@eslint/js"; |
| 3 | +import stylistic from "@stylistic/eslint-plugin"; |
| 4 | + |
| 5 | + |
| 6 | +export default [ |
| 7 | + js.configs.recommended, |
| 8 | + { ignores: ["*.config.*"] }, |
| 9 | + { |
| 10 | + plugins: { |
| 11 | + '@stylistic': stylistic |
| 12 | + }, |
| 13 | + languageOptions: { |
| 14 | + globals: { |
| 15 | + ...globals.browser, |
| 16 | + ...globals.node, |
| 17 | + }, |
| 18 | + ecmaVersion: "latest", |
| 19 | + sourceType: "module", |
| 20 | + }, |
| 21 | + |
| 22 | + rules: { |
| 23 | + "@stylistic/max-len": [1, 120, 2, { "ignoreComments": true }], |
| 24 | + "no-unused-vars": "warn", |
| 25 | + "no-console": "off", |
| 26 | + "@stylistic/comma-dangle": ["warn", "only-multiline"], |
| 27 | + "@stylistic/semi": ["warn", "always"], |
| 28 | + "@stylistic/quotes": [2, "single", |
| 29 | + { |
| 30 | + allowTemplateLiterals: true, |
| 31 | + avoidEscape: true, |
| 32 | + }, |
| 33 | + ], |
| 34 | + "camelcase": ["error", {"properties": "always"}], |
| 35 | + "dot-notation": "warn", |
| 36 | + "@stylistic/space-before-function-paren": "off", |
| 37 | + "@stylistic/indent": ["warn", 2], |
| 38 | + "@stylistic/padded-blocks": "off", |
| 39 | + "@stylistic/no-trailing-spaces": "warn", |
| 40 | + "@stylistic/array-bracket-spacing": "warn", |
| 41 | + "@stylistic/no-multi-spaces": ["error", { "ignoreEOLComments": true }], |
| 42 | + "no-var": "error", |
| 43 | + }, |
| 44 | + }, |
| 45 | +]; |
0 commit comments