Skip to content

Commit

Permalink
Update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
hankolsen committed Oct 22, 2024
1 parent 8644d77 commit 27c0579
Show file tree
Hide file tree
Showing 7 changed files with 5,709 additions and 3,159 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc

This file was deleted.

58 changes: 58 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import vuePlugin from 'eslint-plugin-vue';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import unusedImports from 'eslint-plugin-unused-imports';
import vueTsEslintConfig from '@vue/eslint-config-typescript';
import prettier from 'eslint-config-prettier';

import globals from 'globals';
import js from '@eslint/js';

export default [
js.configs.recommended,
prettier,
...vueTsEslintConfig(),

{
plugins: {
'@typescript-eslint': tsPlugin,
vue: vuePlugin,
'unused-imports': unusedImports,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
'vue/setup-compiler-macros': 'readonly',
},

ecmaVersion: 2021,
sourceType: 'module',
},

rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
...vuePlugin.configs['vue3-recommended'].rules,
quotes: ['error', 'single', { allowTemplateLiterals: true }],

semi: ['error', 'always'],
'unused-imports/no-unused-imports': 'error',
'vue/attribute-hyphenation': 'off',
'vue/html-self-closing': 'off',
'vue/multi-word-component-names': 'off',
'vue/script-setup-uses-vars': 'error',

'vue/first-attribute-linebreak': [
'error',
{
singleline: 'ignore',
multiline: 'ignore',
},
],
},
},
{
ignores: ['**/dist', '**/node_modules'],
},
];
Loading

0 comments on commit 27c0579

Please sign in to comment.