Skip to content

Commit 44ff9d3

Browse files
author
Joonatan Mäkinen
committed
Skip: Update dependency eslint to v9 (merge commit)
Merge branch 'renovate/eslint-9.x' into 'main' * Skip: Update dependency eslint to v9 See merge request https://gitlab.ci.csc.fi/sds-dev/sd-connect/swift-browser-ui/-/merge_requests/327 Approved-by: Joonatan Mäkinen <[email protected]> Co-authored-by: renovate-bot <[email protected]> Merged by Joonatan Mäkinen <[email protected]>
2 parents 42edc43 + 125036c commit 44ff9d3

File tree

6 files changed

+196
-116
lines changed

6 files changed

+196
-116
lines changed

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ frontend-lint:
4949

5050
image: $BUILD_IMAGE
5151
before_script:
52-
- pnpm --prefix swift_browser_ui_frontend install --prod
52+
- pnpm --prefix swift_browser_ui_frontend install
5353
script:
5454
- pnpm --prefix swift_browser_ui_frontend lint
5555

swift_browser_ui_frontend/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ typings/
9393

9494
.DS_Store
9595
dist
96+
src/dist
9697

9798
# local env files
9899
.env.local
+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import vue from "eslint-plugin-vue";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
import fs from 'node:fs/promises';
10+
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all
15+
});
16+
17+
export default [
18+
{ files: ["**/*.js","**/*.vue"]},
19+
...compat.extends(""),
20+
...vue.configs['flat/recommended', "flat/base", "flat/essential"],
21+
{ ignores: await fs
22+
.readFile('.gitignore', { encoding: 'utf8' })
23+
.then((r) => r.split(/[\r\n]+/).filter((r) => !r.trim().startsWith('#') && r.trim() !== '')) },
24+
{
25+
plugins: {
26+
vue
27+
},
28+
languageOptions: {
29+
globals: {
30+
...globals.browser,
31+
...globals.node,
32+
...globals.jest,
33+
Atomics: "readonly",
34+
SharedArrayBuffer: "readonly",
35+
import: "readonly",
36+
},
37+
38+
ecmaVersion: 2021,
39+
sourceType: "module",
40+
},
41+
42+
rules: {
43+
indent: ["error", 2, {
44+
SwitchCase: 1,
45+
}],
46+
47+
"linebreak-style": ["error", "unix"],
48+
quotes: ["error", "double"],
49+
semi: ["error", "always"],
50+
"comma-dangle": ["error", "always-multiline"],
51+
52+
"max-len": ["error", {
53+
code: 80,
54+
comments: 75,
55+
ignoreTemplateLiterals: true,
56+
ignoreUrls: true,
57+
}],
58+
59+
"vue/html-closing-bracket-newline": ["error", {
60+
singleline: "never",
61+
multiline: "always",
62+
}],
63+
64+
"vue/mustache-interpolation-spacing": ["error", "always"],
65+
66+
"vue/script-indent": ["error", 2, {
67+
baseIndent: 0,
68+
switchCase: 1,
69+
}],
70+
71+
"vue/require-prop-types": [0],
72+
"vue/no-deprecated-slot-attribute": [0],
73+
"vue/v-on-event-hyphenation": [0],
74+
"vue/require-explicit-emits": [0],
75+
76+
"vue/attribute-hyphenation": ["error", "always", {
77+
ignore: ["footerOptions"],
78+
}],
79+
},
80+
},
81+
];

swift_browser_ui_frontend/package.json

+6-24
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
"name": "swift_browser_ui_frontend_npm",
33
"version": "2.0.1",
44
"private": true,
5+
"type": "module",
56
"scripts": {
67
"serve": "./build_wasm.sh && vite serve --mode development",
78
"build": "./build_wasm.sh && vite build --mode production",
89
"test": "vue-cli-service test:unit --config=jest.config.js",
9-
"lint": "pnpm exec eslint --ext .js,.vue --ignore-path .gitignore --fix src",
10+
"lint": "pnpm exec eslint --fix src",
1011
"build-devel": "./build_wasm.sh && vite build --mode development",
1112
"serve-prod": "./build_wasm.sh && vite serve --mode production",
1213
"build-wasm": "./build_wasm.sh",
@@ -22,7 +23,7 @@
2223
"cli-highlight": "^2.1.11",
2324
"csc-ui": "0.9.5",
2425
"dexie": "^4.0.0",
25-
"eslint": "^8.57.0",
26+
"eslint": "^9.0.0",
2627
"eslint-plugin-vue": "^9.26.0",
2728
"eslint-utils": "^3.0.0",
2829
"lodash": "^4.17.21",
@@ -38,6 +39,8 @@
3839
"webpack-cli": "^5.1.4"
3940
},
4041
"devDependencies": {
42+
"@eslint/eslintrc": "^3.1.0",
43+
"@eslint/js": "^9.4.0",
4144
"@faker-js/faker": "^8.4.1",
4245
"@testing-library/dom": "^10.0.0",
4346
"@testing-library/jest-dom": "^6.4.5",
@@ -46,30 +49,9 @@
4649
"@vue/compiler-sfc": "^3.4.27",
4750
"cypress": "^13.10.0",
4851
"cypress-cloud": "^1.10.2",
52+
"globals": "^15.3.0",
4953
"install": "^0.13.0",
5054
"jest": "^29.7.0",
5155
"pg": "^8.11.5"
52-
},
53-
"eslintConfig": {
54-
"root": true,
55-
"env": {
56-
"node": true
57-
},
58-
"extends": [
59-
"plugin:vue/essential",
60-
"eslint:recommended"
61-
],
62-
"rules": {},
63-
"overrides": [
64-
{
65-
"files": [
66-
"**/__tests__/*.{j,t}s?(x)",
67-
"**/*.spec.{j,t}s?(x)"
68-
],
69-
"env": {
70-
"jest": true
71-
}
72-
}
73-
]
7456
}
7557
}

0 commit comments

Comments
 (0)