|
1 | | -import globals from 'globals' |
2 | | -import pluginJs from '@eslint/js' |
| 1 | +import { defineConfig } from 'eslint/config' |
| 2 | +import standardjs from '@seungwoo321/eslint-plugin-standard-js' |
3 | 3 | import pluginVue from 'eslint-plugin-vue' |
4 | | -import pluginImport from 'eslint-plugin-import' |
5 | | -import { standard } from './eslint.standard.mjs' |
6 | 4 |
|
7 | | -export default [ |
| 5 | +export default defineConfig([ |
8 | 6 | { |
9 | | - ignores: ['node_modules/**', 'dist/**', 'build/**', '.history/**'] |
10 | | - }, |
11 | | - { files: ['**/*.{js,mjs,cjs,vue}'] }, |
12 | | - { |
13 | | - languageOptions: { |
14 | | - globals: { |
15 | | - ...globals.browser, |
16 | | - ...globals.node |
17 | | - } |
18 | | - } |
19 | | - }, |
20 | | - pluginJs.configs.recommended, |
21 | | - ...pluginVue.configs['flat/essential'], |
22 | | - { |
23 | | - plugins: { |
24 | | - import: pluginImport |
25 | | - } |
| 7 | + ignores: [ |
| 8 | + 'packages/plotly-renderer/**', |
| 9 | + 'node_modules/**', |
| 10 | + 'dist/**', |
| 11 | + 'build/**', |
| 12 | + '.history/**', |
| 13 | + '**/dist/**' |
| 14 | + ] |
26 | 15 | }, |
27 | 16 | { |
| 17 | + files: ['**/*.{js,mjs,cjs,vue}', 'eslint.config.js'], |
| 18 | + extends: [ |
| 19 | + ...standardjs.configs.recommended, |
| 20 | + ...pluginVue.configs['flat/strongly-recommended'] |
| 21 | + ], |
28 | 22 | rules: { |
29 | | - ...standard.rules, |
30 | | - '@typescript-eslint/no-explicit-any': 'off', |
31 | | - 'space-before-function-paren': [ |
| 23 | + '@stylistic/space-before-function-paren': [ |
32 | 24 | 'error', |
33 | 25 | { |
34 | 26 | anonymous: 'always', |
35 | 27 | named: 'never', |
36 | 28 | asyncArrow: 'always' |
37 | 29 | } |
38 | 30 | ], |
39 | | - 'quote-props': ['error', 'consistent'] |
| 31 | + '@stylistic/quote-props': ['error', 'consistent'], |
| 32 | + 'vue/html-self-closing': [ |
| 33 | + 'error', |
| 34 | + { |
| 35 | + html: { |
| 36 | + void: 'always', |
| 37 | + normal: 'always', |
| 38 | + component: 'always' |
| 39 | + }, |
| 40 | + svg: 'always', |
| 41 | + math: 'always' |
| 42 | + } |
| 43 | + ], |
| 44 | + 'vue/singleline-html-element-content-newline': [ |
| 45 | + 'error', |
| 46 | + { |
| 47 | + ignoreWhenNoAttributes: true, |
| 48 | + ignoreWhenEmpty: true, |
| 49 | + ignores: ['pre', 'textarea', 'div'], |
| 50 | + externalIgnores: [] |
| 51 | + } |
| 52 | + ] |
40 | 53 | } |
41 | 54 | } |
42 | | -] |
| 55 | +]) |
0 commit comments