Skip to content

Commit

Permalink
Merge pull request #382 from traPtitech/updateESLint
Browse files Browse the repository at this point in the history
UpdateESLint
  • Loading branch information
Pugma authored Oct 21, 2024
2 parents 906aaf5 + a9dad9f commit 4e29e0e
Show file tree
Hide file tree
Showing 35 changed files with 2,383 additions and 6,283 deletions.
40 changes: 0 additions & 40 deletions .eslintrc.cjs

This file was deleted.

46 changes: 46 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import globals from 'globals'
import eslint from '@eslint/js'
import tsESLint from 'typescript-eslint'
import eslintPluginVue from 'eslint-plugin-vue'

const commonLint = {
languageOptions: {
globals: {
...globals.browser
}
}
}

const vueLint = {
files: ['*.vue', '**/*.vue'],
languageOptions: {
parserOptions: {
parser: '@typescript-eslint/parser'
}
},
rules: {
'no-console': 'warn',
'no-debugger': 'warn',

'no-restricted-imports': [
'error',
{
name: '/@/lib/apis/generated',
message: 'Please use /@/lib/apis instead.'
}
],

'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/custom-event-name-casing': ['error', 'camelCase'],
'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off'
}
}

export default tsESLint.config(
eslint.configs.recommended,
...tsESLint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
commonLint,
vueLint
)
Loading

0 comments on commit 4e29e0e

Please sign in to comment.