Skip to content

Commit

Permalink
Merge pull request #4347 from traPtitech/dependabot/npm_and_yarn/type…
Browse files Browse the repository at this point in the history
…script-eslint/parser-7.15.0

Bump @typescript-eslint/parser from 6.17.0 to 7.15.0
  • Loading branch information
nokhnaton authored Oct 21, 2024
2 parents 487e1fb + 83d8073 commit fd083ee
Show file tree
Hide file tree
Showing 12 changed files with 560 additions and 518 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

77 changes: 0 additions & 77 deletions .eslintrc.cjs

This file was deleted.

2 changes: 2 additions & 0 deletions build/gen-mplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import util from 'util'
import esbuild from 'esbuild'
import { resolveToEsbuildTarget } from 'esbuild-plugin-browserslist'
import browserslist from 'browserslist'
import { Buffer } from 'node:buffer'
import process from 'process'

const brotliCompress = util.promisify(zlib.brotliCompress)

Expand Down
1 change: 1 addition & 0 deletions eslint-vue-ts-recommended.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* 適用されるようにするためにoverridesに'*.vue'を追加する
*/

// eslint-disable-next-line @typescript-eslint/no-require-imports
const typescriptEslintEslintRecommended = require('./node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended')

module.exports = {
Expand Down
142 changes: 142 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import unusedImports from 'eslint-plugin-unused-imports'
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'
import stylisticTs from '@stylistic/eslint-plugin-ts'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [
{
ignores: ['**/coverage', '**/dist', '**/node_modules']
},
...compat.extends(
'eslint:recommended',
'./eslint-vue-ts-recommended.cjs',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'prettier'
),
{
plugins: {
'unused-imports': unusedImports,
'@stylistic/ts': stylisticTs
},

linterOptions: {
reportUnusedDisableDirectives: true
},

languageOptions: {
ecmaVersion: 5,
sourceType: 'script',

parserOptions: {
parser: '@typescript-eslint/parser'
}
},

rules: {
'no-console': 'warn',
'no-debugger': 'warn',

'no-empty': [
'error',
{
allowEmptyCatch: true
}
],

eqeqeq: 'error',
'vue/eqeqeq': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',

'@stylistic/ts/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none'
},

singleline: {
delimiter: 'semi'
}
}
],

'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': 'off',
'vue/require-default-prop': 'off',
'vue/no-v-html': 'off',

'vue/block-lang': [
'error',
{
script: {
lang: 'ts'
},

style: {
lang: 'scss'
}
}
],

'vue/component-api-style': ['error', ['script-setup']],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],

'vue/v-on-event-hyphenation': [
'error',
'always',
{
autofix: true
}
],

'vue/v-on-function-call': 'error',
'vue/no-template-target-blank': 'error',
'vue/prefer-true-attribute-shorthand': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'error'
}
},
{
files: ['**/*.cjs'],
ignores: ['*/**/*.cjs'],

languageOptions: {
globals: {
...globals.node
}
},

rules: {
'@typescript-eslint/no-var-requires': 'off'
}
},
...compat.extends('plugin:cypress/recommended').map(config => ({
...config,
files: ['**/tests/e2e/**/*.{js,cjs,jsx,ts,tsx}']
})),
{
files: ['**/tests/e2e/**/*.{js,cjs,jsx,ts,tsx}'],

languageOptions: {
globals: {
...globals.node
}
}
}
]
Loading

0 comments on commit fd083ee

Please sign in to comment.