|
| 1 | +import globals from "globals"; |
| 2 | +import html from "eslint-plugin-html"; |
| 3 | +import js from "@eslint/js"; |
| 4 | +import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'; |
| 5 | +import stylistic from '@stylistic/eslint-plugin'; |
| 6 | + |
| 7 | +export default [ |
| 8 | + { |
| 9 | + files: ["**/*.js"], |
| 10 | + languageOptions: { |
| 11 | + globals: { |
| 12 | + ...globals.browser, |
| 13 | + }, |
| 14 | + sourceType: "script", |
| 15 | + }, |
| 16 | + }, |
| 17 | + { |
| 18 | + files: ["**/*.html"], |
| 19 | + plugins: { html }, |
| 20 | + settings: { |
| 21 | + "html/indent": "tab", |
| 22 | + "html/report-bad-indent": "error", |
| 23 | + }, |
| 24 | + }, |
| 25 | + { |
| 26 | + ignores: [ |
| 27 | + ...resolveIgnoresFromGitignore(), |
| 28 | + ], |
| 29 | + }, |
| 30 | + js.configs.recommended, |
| 31 | + // stylistic.configs['recommended-flat'], |
| 32 | + ...neostandard(), |
| 33 | + { |
| 34 | + plugins: { |
| 35 | + "@stylistic": stylistic, |
| 36 | + }, |
| 37 | + rules: { |
| 38 | + "camelcase": "off", |
| 39 | + "eqeqeq": "off", |
| 40 | + "no-empty": ["error", { "allowEmptyCatch": true }], |
| 41 | + "no-unused-vars": ["error", { |
| 42 | + "args": "none", |
| 43 | + "caughtErrors": "none", |
| 44 | + }], |
| 45 | + "object-shorthand": ["warn", "consistent"], |
| 46 | + "yoda": "off", |
| 47 | + "@stylistic/indent": ["warn", "tab", { "SwitchCase": 1 }], |
| 48 | + "@stylistic/linebreak-style": ["error", "unix"], |
| 49 | + "@stylistic/max-len": ["warn", 165], |
| 50 | + "@stylistic/no-tabs": "off", |
| 51 | + "@stylistic/quotes": ["off", "single", { "avoidEscape": true }], |
| 52 | + "@stylistic/quote-props": ["warn", "consistent"], |
| 53 | + "@stylistic/semi": ["warn", "always"], |
| 54 | + "@stylistic/space-before-function-paren": ["warn", { |
| 55 | + "anonymous": "always", |
| 56 | + "asyncArrow": "always", |
| 57 | + "named": "never", |
| 58 | + }], |
| 59 | + }, |
| 60 | + }, |
| 61 | +]; |
0 commit comments