Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency eslint to v9 #3594

Merged
merged 31 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bb49ff9
Update to eslint 9
qwerty287 Apr 10, 2024
fbef100
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Apr 15, 2024
b3e4c43
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Apr 19, 2024
263d759
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Apr 25, 2024
c57f4dd
Merge branch 'main' into renovate/eslint-9.x
qwerty287 May 1, 2024
62d2e78
Merge branch 'main' into renovate/eslint-9.x
qwerty287 May 23, 2024
97a0ebf
Merge remote-tracking branch 'upstream/main' into renovate/eslint-9.x
anbraten May 27, 2024
7da0645
Merge remote-tracking branch 'upstream/main' into renovate/eslint-9.x
anbraten May 28, 2024
bac7e34
update config
anbraten May 28, 2024
22c1d55
Merge branch 'main' into renovate/eslint-9.x
qwerty287 May 30, 2024
e3bec7e
Add some more configs back
qwerty287 May 30, 2024
8f3357d
run autofix
qwerty287 May 30, 2024
327302b
fix most issues
qwerty287 May 30, 2024
a30885b
[pre-commit.ci] auto fixes from pre-commit.com hooks [CI SKIP]
pre-commit-ci[bot] May 30, 2024
c0ce86c
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Jun 1, 2024
68f7000
Add @ianvs/prettier-plugin-sort-imports
qwerty287 Jun 1, 2024
eb1b971
Fix spellcheck
qwerty287 Jun 1, 2024
cac497d
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Jun 5, 2024
73152e2
fix lint
qwerty287 Jun 5, 2024
a705145
update
qwerty287 Jun 5, 2024
d825f17
fix prettier
qwerty287 Jun 5, 2024
babc4f8
fix eslint/prettier working differently
qwerty287 Jun 5, 2024
f5cecfd
fix some lints
qwerty287 Jun 5, 2024
5be3a7c
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Jun 6, 2024
2798d1a
Merge remote-tracking branch 'upstream/main' into renovate/eslint-9.x
anbraten Jun 6, 2024
e2a0332
Merge branch 'renovate/eslint-9.x' of github.com:woodpecker-ci/woodpe…
anbraten Jun 6, 2024
c032751
fix lint
anbraten Jun 6, 2024
29071f8
adjust import sorting
anbraten Jun 6, 2024
cb41c5e
fix imports
anbraten Jun 6, 2024
2f587e5
fix ts
anbraten Jun 6, 2024
7a87ba9
Merge branch 'main' into renovate/eslint-9.x
anbraten Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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