mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-03-21 09:44:09 -05:00
Migrate ESLint to v9 with flat config
- eslint: 8.57.0 → 9.39.2 - eslint-plugin-vue: 9.23.0 → 10.8.0 - eslint-plugin-jsdoc: 48.2.1 → 62.5.5 - Replaced .eslintrc.cjs with eslint.config.mjs (flat config) - Removed @vue/eslint-config-airbnb and eslint-plugin-import - Added @eslint/js, globals, vue-eslint-parser, typescript as deps - Removed stale eslint-disable comments for import/no-unresolved - Simplified lint script (ESLint 9 handles extensions/ignores via config) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d5c97a5bf6
commit
e6004154b9
|
|
@ -1,69 +0,0 @@
|
|||
/* eslint-env node */
|
||||
const createAliasSetting = require('@vue/eslint-config-airbnb/createAliasSetting');
|
||||
|
||||
module.exports = {
|
||||
'root': true,
|
||||
'plugins': [
|
||||
'@dword-design/import-alias',
|
||||
],
|
||||
'extends': [
|
||||
'plugin:vue/vue3-recommended',
|
||||
'eslint:recommended',
|
||||
'plugin:import/recommended',
|
||||
'plugin:jsdoc/recommended',
|
||||
],
|
||||
'rules': {
|
||||
// ESLint
|
||||
'indent': ['warn', 2, { 'SwitchCase': 1 }],
|
||||
'comma-dangle': ['warn', 'always-multiline'],
|
||||
'no-unused-vars': ['warn', { 'args': 'none' }],
|
||||
'semi': 'warn',
|
||||
'quotes': ['warn' , 'single'],
|
||||
'object-curly-spacing': ['warn', 'always'],
|
||||
|
||||
// Vue
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/max-attributes-per-line': ['warn', { singleline: { max: 4 } }],
|
||||
'vue/html-self-closing': ['warn', { html: { void: 'always' } }],
|
||||
|
||||
// Imports
|
||||
'import/order': 'warn',
|
||||
|
||||
// JSDoc
|
||||
'jsdoc/require-jsdoc': 'off',
|
||||
'jsdoc/require-returns': 'off',
|
||||
'jsdoc/require-param-description': 'off',
|
||||
},
|
||||
'globals': {
|
||||
'__dirname': 'readonly',
|
||||
'process': 'readonly',
|
||||
'require': 'readonly',
|
||||
'module': 'readonly',
|
||||
'Buffer': 'readonly',
|
||||
},
|
||||
'overrides': [
|
||||
{
|
||||
'files': ['src/**'],
|
||||
'rules': {
|
||||
'@dword-design/import-alias/prefer-alias': ['warn', { 'alias': {
|
||||
'@': './src',
|
||||
} }],
|
||||
},
|
||||
},
|
||||
],
|
||||
'env': {
|
||||
'vue/setup-compiler-macros': true,
|
||||
},
|
||||
'ignorePatterns': [
|
||||
'src/assets/i18n/index.mjs', // "assert" syntax is currently unrecognized
|
||||
],
|
||||
'parserOptions': {
|
||||
'ecmaVersion': 13,
|
||||
},
|
||||
settings: {
|
||||
...createAliasSetting({
|
||||
'@': './src',
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
import mkdirp from 'mkdirp';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import PQueue from 'p-queue';
|
||||
import prefixedConsole from '../common/prefixedConsole.mjs';
|
||||
import { normalizeSplatnetResourcePath } from '../common/util.mjs';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
// eslint-disable-next-line import/no-unresolved
|
||||
import CoralApi from 'nxapi/coral';
|
||||
import { addUserAgent } from 'nxapi';
|
||||
import pLimit from 'p-limit';
|
||||
|
|
|
|||
63
eslint.config.mjs
Normal file
63
eslint.config.mjs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
import js from '@eslint/js';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import pluginJsdoc from 'eslint-plugin-jsdoc';
|
||||
import importAlias from '@dword-design/eslint-plugin-import-alias';
|
||||
import globals from 'globals';
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
...pluginVue.configs['flat/recommended'],
|
||||
pluginJsdoc.configs['flat/recommended'],
|
||||
|
||||
// Global settings
|
||||
{
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
// ESLint
|
||||
'indent': ['warn', 2, { 'SwitchCase': 1 }],
|
||||
'comma-dangle': ['warn', 'always-multiline'],
|
||||
'no-unused-vars': ['warn', { 'args': 'none' }],
|
||||
'semi': 'warn',
|
||||
'quotes': ['warn', 'single'],
|
||||
'object-curly-spacing': ['warn', 'always'],
|
||||
|
||||
// Vue
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/max-attributes-per-line': ['warn', { singleline: { max: 4 } }],
|
||||
'vue/html-self-closing': ['warn', { html: { void: 'always' } }],
|
||||
|
||||
// JSDoc
|
||||
'jsdoc/require-jsdoc': 'off',
|
||||
'jsdoc/require-returns': 'off',
|
||||
'jsdoc/require-param-description': 'off',
|
||||
},
|
||||
},
|
||||
|
||||
// Import alias for src files
|
||||
{
|
||||
files: ['src/**'],
|
||||
plugins: {
|
||||
'@dword-design/import-alias': importAlias.configs.recommended.plugins['@dword-design/import-alias'],
|
||||
},
|
||||
rules: {
|
||||
'@dword-design/import-alias/prefer-alias': ['warn', { 'alias': {
|
||||
'@': './src',
|
||||
} }],
|
||||
},
|
||||
},
|
||||
|
||||
// Ignored files
|
||||
{
|
||||
ignores: [
|
||||
'dist/**',
|
||||
'src/assets/i18n/index.mjs',
|
||||
],
|
||||
},
|
||||
];
|
||||
3302
package-lock.json
generated
3302
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
|
|
@ -5,7 +5,7 @@
|
|||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview --port 5050",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --ignore-path .gitignore",
|
||||
"lint": "eslint .",
|
||||
"lint-fix": "npm run lint -- --fix",
|
||||
"cron": "node app/index.mjs cron",
|
||||
"start": "npm run sync:download && npm run splatnet:quick && npm run social && npm run cron",
|
||||
|
|
@ -55,16 +55,18 @@
|
|||
"vue-router": "^4.6.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dword-design/eslint-plugin-import-alias": "^5.0.0",
|
||||
"@dword-design/eslint-plugin-import-alias": "^8.1.3",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/eslint-config-airbnb": "^8.0.0",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"eslint": "^8.23.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-jsdoc": "^48.2.1",
|
||||
"eslint-plugin-vue": "^9.5.1",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-plugin-jsdoc": "^62.5.5",
|
||||
"eslint-plugin-vue": "^10.8.0",
|
||||
"globals": "^17.3.0",
|
||||
"postcss": "^8.4.16",
|
||||
"tailwindcss": "^3.1.8",
|
||||
"vite": "^6.4.1"
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^6.4.1",
|
||||
"vue-eslint-parser": "^10.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user