Skip to content

Commit bf3e636

Browse files
authored
Merge pull request #297 from mrholek/main
Upgrade ESLint to v9.x and update dependencies
2 parents 23ccdc8 + 9ffefe6 commit bf3e636

File tree

8 files changed

+118
-116
lines changed

8 files changed

+118
-116
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 75 deletions
This file was deleted.

.prettierrc.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import eslint from '@eslint/js'
2+
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
3+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
4+
import eslintPluginVue from 'eslint-plugin-vue'
5+
import globals from 'globals'
6+
import typescriptEslint from 'typescript-eslint'
7+
8+
export default typescriptEslint.config(
9+
{ ignores: ['**/*.d.ts', '**/coverage', '**/dist', '**/docs'] },
10+
{
11+
extends: [
12+
eslint.configs.recommended,
13+
...typescriptEslint.configs.recommended,
14+
...eslintPluginVue.configs['flat/recommended'],
15+
eslintPluginUnicorn.configs['flat/recommended'],
16+
],
17+
files: ['packages/**/src/**/*.{js,ts,tsx}'],
18+
languageOptions: {
19+
ecmaVersion: 'latest',
20+
sourceType: 'module',
21+
globals: globals.browser,
22+
parserOptions: {
23+
parser: typescriptEslint.parser,
24+
},
25+
},
26+
rules: {
27+
'no-console': 'off',
28+
'no-debugger': 'off',
29+
'unicorn/filename-case': 'off',
30+
'unicorn/no-array-for-each': 'off',
31+
'unicorn/no-null': 'off',
32+
'unicorn/prefer-dom-node-append': 'off',
33+
'unicorn/prefer-export-from': 'off',
34+
'unicorn/prefer-query-selector': 'off',
35+
'unicorn/prevent-abbreviations': 'off',
36+
'vue/require-default-prop': 'off',
37+
},
38+
},
39+
{
40+
files: ['**/*.mjs'],
41+
languageOptions: {
42+
globals: {
43+
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, 'off'])),
44+
...globals.node,
45+
},
46+
47+
ecmaVersion: 'latest',
48+
sourceType: 'module',
49+
},
50+
},
51+
{
52+
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
53+
languageOptions: {
54+
globals: {
55+
...globals.jest,
56+
},
57+
},
58+
},
59+
{
60+
files: ['packages/docs/build/**'],
61+
languageOptions: {
62+
globals: {
63+
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, 'off'])),
64+
...globals.node,
65+
},
66+
67+
ecmaVersion: 5,
68+
sourceType: 'commonjs',
69+
},
70+
rules: {
71+
'no-console': 'off',
72+
strict: 'error',
73+
},
74+
},
75+
eslintPluginPrettierRecommended,
76+
)

package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,21 @@
1717
"lib:build": "lerna run --scope \"@coreui/vue\" build --stream",
1818
"lib:test": "lerna run --scope \"@coreui/vue\" test --stream",
1919
"lib:test:update": "lerna run --scope \"@coreui/vue\" test:update --stream",
20-
"lint": "eslint \"packages/**/src/**/*.{js,ts,tsx}\"",
20+
"lint": "eslint",
2121
"test": "npm-run-all charts:test icons:test lib:test",
2222
"test:update": "npm-run-all charts:test:update icons:test:update lib:test:update"
2323
},
2424
"devDependencies": {
25-
"@typescript-eslint/eslint-plugin": "^8.6.0",
26-
"@typescript-eslint/parser": "^8.6.0",
27-
"@vue/eslint-config-prettier": "^9.0.0",
28-
"@vue/eslint-config-typescript": "^13.0.0",
2925
"@vue/vue3-jest": "29.2.6",
30-
"eslint": "8.57.0",
31-
"eslint-plugin-prettier": "^5.2.1",
32-
"eslint-plugin-vue": "^9.28.0",
26+
"eslint": "^9.17.0",
3327
"eslint-config-prettier": "^9.1.0",
34-
"eslint-plugin-unicorn": "^55.0.0",
35-
"lerna": "^8.1.8",
28+
"eslint-plugin-prettier": "^5.2.1",
29+
"eslint-plugin-unicorn": "^56.0.1",
30+
"eslint-plugin-vue": "^9.32.0",
31+
"globals": "^15.14.0",
32+
"lerna": "^8.1.9",
3633
"npm-run-all": "^4.1.5",
37-
"prettier": "^3.3.3"
34+
"prettier": "^3.4.2",
35+
"typescript-eslint": "^8.19.1"
3836
}
3937
}

packages/coreui-vue/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@
4545
"@popperjs/core": "^2.11.8"
4646
},
4747
"devDependencies": {
48-
"@rollup/plugin-commonjs": "^28.0.1",
49-
"@rollup/plugin-node-resolve": "^15.3.0",
50-
"@rollup/plugin-typescript": "^12.1.1",
48+
"@rollup/plugin-commonjs": "^28.0.2",
49+
"@rollup/plugin-node-resolve": "^16.0.0",
50+
"@rollup/plugin-typescript": "^12.1.2",
5151
"@types/jest": "^29.5.14",
5252
"@vue/test-utils": "^2.4.6",
5353
"@vue/vue3-jest": "29.2.6",
5454
"cross-env": "^7.0.3",
5555
"jest": "^29.7.0",
5656
"jest-environment-jsdom": "^29.7.0",
57-
"rollup": "^4.24.2",
57+
"rollup": "^4.30.1",
5858
"rollup-plugin-vue": "^6.0.0",
5959
"ts-jest": "^29.2.5",
60-
"typescript": "^5.6.3",
61-
"vue": "^3.5.12",
60+
"typescript": "^5.7.2",
61+
"vue": "^3.5.13",
6262
"vue-types": "^5.1.3"
6363
},
6464
"peerDependencies": {

packages/docs/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
"@coreui/icons-vue": "^2.2.0",
1515
"@coreui/utils": "^2.0.2",
1616
"@coreui/vue-chartjs": "^3.0.0",
17-
"@docsearch/css": "^3.6.2",
18-
"@docsearch/js": "^3.6.2",
19-
"@vuepress/bundler-vite": "2.0.0-rc.18",
20-
"@vuepress/bundler-webpack": "2.0.0-rc.18",
21-
"@vuepress/plugin-active-header-links": "2.0.0-rc.55",
22-
"@vuepress/plugin-git": "2.0.0-rc.56",
23-
"@vuepress/plugin-markdown-container": "2.0.0-rc.54",
17+
"@docsearch/css": "^3.8.2",
18+
"@docsearch/js": "^3.8.2",
19+
"@vuepress/bundler-vite": "2.0.0-rc.19",
20+
"@vuepress/bundler-webpack": "2.0.0-rc.19",
21+
"@vuepress/plugin-active-header-links": "2.0.0-rc.69",
22+
"@vuepress/plugin-git": "2.0.0-rc.68",
23+
"@vuepress/plugin-markdown-container": "2.0.0-rc.66",
2424
"@vuepress/plugin-prismjs": "2.0.0-rc.37",
25-
"@vuepress/plugin-theme-data": "2.0.0-rc.57",
26-
"@vuepress/plugin-register-components": "2.0.0-rc.54",
27-
"@vuepress/plugin-toc": "2.0.0-rc.55",
28-
"@vuepress/shared": "2.0.0-rc.18",
29-
"@vuepress/utils": "2.0.0-rc.18",
25+
"@vuepress/plugin-theme-data": "2.0.0-rc.69",
26+
"@vuepress/plugin-register-components": "2.0.0-rc.66",
27+
"@vuepress/plugin-toc": "2.0.0-rc.66",
28+
"@vuepress/shared": "2.0.0-rc.19",
29+
"@vuepress/utils": "2.0.0-rc.19",
3030
"markdown-it-anchor": "^9.2.0",
3131
"markdown-it-include": "^2.0.0",
32-
"sass": "^1.80.4",
32+
"sass": "^1.83.1",
3333
"vue-docgen-cli": "^4.79.0",
34-
"vuepress": "2.0.0-rc.18"
34+
"vuepress": "2.0.0-rc.19"
3535
}
3636
}

prettier.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @see https://prettier.io/docs/en/configuration.html
3+
* @type {import("prettier").Config}
4+
*/
5+
const config = {
6+
printWidth: 100,
7+
semi: false,
8+
singleQuote: true,
9+
tabWidth: 2,
10+
trailingComma: 'es5',
11+
};
12+
13+
export default config;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy