Skip to content

Commit

Permalink
chore(deps): update dependency eslint to v9 - abandoned (#3594)
Browse files Browse the repository at this point in the history
Co-authored-by: qwerty287 <[email protected]>
Co-authored-by: qwerty287 <[email protected]>
Co-authored-by: Anbraten <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
5 people committed Jun 6, 2024
1 parent c724684 commit 2241474
Show file tree
Hide file tree
Showing 110 changed files with 4,631 additions and 3,697 deletions.
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"words": [
"abool",
"anbraten",
"antfu",
"apimachinery",
"autoincr",
"autoscaler",
Expand Down Expand Up @@ -67,6 +68,7 @@
"httpsig",
"HTTPURL",
"httputil",
"ianvs",
"iconify",
"Infof",
"Informatyka",
Expand Down Expand Up @@ -144,6 +146,7 @@
"tmpfs",
"tmpl",
"tolerations",
"tseslint",
"ttlcache",
"typecheck",
"Typeflag",
Expand Down
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast"],
"eslint.workingDirectories": ["./web"],
"prettier.ignorePath": "./web/.prettierignore"
"prettier.ignorePath": "./web/.prettierignore",
// Enable the ESlint flat config support
// (remove this if your ESLint extension above v3.0.5)
"eslint.experimental.useFlatConfig": true,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
}
}
9 changes: 0 additions & 9 deletions web/.eslintignore

This file was deleted.

161 changes: 0 additions & 161 deletions web/.eslintrc.js

This file was deleted.

15 changes: 15 additions & 0 deletions web/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { readFile } from 'node:fs/promises';

const config = JSON.parse(await readFile(new URL('../.prettierrc.json', import.meta.url)));

export default {
...config,
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'<THIRD_PARTY_MODULES>', // Imports not matched by other special words or groups.
'', // Empty string will match any import not matched by other special words or groups.
'^(#|@|~|\\$)(/.*)$',
'',
'^[./]',
],
};
119 changes: 119 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
// cSpell:ignore tseslint
// @ts-check

import antfu from '@antfu/eslint-config';
import js from '@eslint/js';
import vueI18n from '@intlify/eslint-plugin-vue-i18n';
import eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css';

export default antfu(
{
stylistic: false,
typescript: {
tsconfigPath: './tsconfig.json',
},
vue: true,

// Disable jsonc and yaml support
jsonc: false,
yaml: false,
},

js.configs.recommended,
// eslintPromise.configs.recommended,

// TypeScript
//...tseslint.configs.recommended,
//...tseslint.configs.recommendedTypeChecked,
//...tseslint.configs.strictTypeChecked,
//...tseslint.configs.stylisticTypeChecked,

{
rules: {
'import/order': 'off',
'sort-imports': 'off',
},
},

...eslintPluginVueScopedCSS.configs['flat/recommended'],

// Vue
{
files: ['**/*.vue'],
rules: {
'vue/multi-word-component-names': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'vue/block-order': [
'error',
{
order: ['template', 'script', 'style'],
},
],
'vue/singleline-html-element-content-newline': ['off'],
},
},

// Vue I18n
...vueI18n.configs['flat/recommended'],
{
rules: {
'@intlify/vue-i18n/no-raw-text': [
'error',
{
attributes: {
'/.+/': ['label'],
},
},
],
'@intlify/vue-i18n/key-format-style': ['error', 'snake_case'],
'@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error',
'@intlify/vue-i18n/no-dynamic-keys': 'error',
'@intlify/vue-i18n/no-deprecated-i18n-component': 'error',
'@intlify/vue-i18n/no-deprecated-tc': 'error',
'@intlify/vue-i18n/no-i18n-t-path-prop': 'error',
'@intlify/vue-i18n/no-missing-keys-in-other-locales': 'off',
'@intlify/vue-i18n/valid-message-syntax': 'error',
'@intlify/vue-i18n/no-missing-keys': 'error',
'@intlify/vue-i18n/no-unknown-locale': 'error',
'@intlify/vue-i18n/no-unused-keys': ['error', { extensions: ['.ts', '.vue'] }],
'@intlify/vue-i18n/prefer-sfc-lang-attr': 'error',
'@intlify/vue-i18n/no-html-messages': 'error',
'@intlify/vue-i18n/prefer-linked-key-with-paren': 'error',
'@intlify/vue-i18n/sfc-locale-attr': 'error',
},
settings: {
'vue-i18n': {
localeDir: './src/assets/locales/en.json',
// Specify the version of `vue-i18n` you are using.
// If not specified, the message will be parsed twice.
messageSyntaxVersion: '^9.0.0',
},
},
},

// Ignore list
{
ignores: [
'dist',
'coverage/',
'package.json',
'tsconfig.eslint.json',
'tsconfig.json',
'src/assets/locales/**/*',
'!src/assets/locales/en.json',
'src/assets/dayjsLocales/',
'components.d.ts',
],
},
);
Loading

0 comments on commit 2241474

Please sign in to comment.