Skip to content

Commit ee63555

Browse files
authored
Merge pull request #196 from wolfpackthatcodes/feature/upgrade-eslint-v9
Upgrade ESLint to version 9
2 parents 32a86c8 + f20ed93 commit ee63555

File tree

10 files changed

+419
-1345
lines changed

10 files changed

+419
-1345
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"files.associations": {
99
".env": "dotenv"
1010
},
11-
"prettier.configPath": "./code/.prettierrc",
11+
"prettier.configPath": "./code/prettier.config.js",
1212
"prettier.ignorePath": "./code/.prettierignore",
1313
"prettier.printWidth": 120
1414
}

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ endif
2323
#
2424
# The `local-setup` target executes the Yarn `install`
2525
# command to install package's dependencies.
26-
#
27-
# https://vitejs.dev/guide/#scaffolding-your-first-vite-project
2826
#--------------------------------------------------------------------------
2927
local-setup:
3028
exec docker run -it --rm --name vite-toolkit \
3129
-v $(PWD)${CODE_DIR}:/app \
3230
-w="/app" \
33-
node:alpine /bin/sh -c "yarn install"
31+
node:alpine /bin/sh -c "yarn install --immutable"

code/.eslintignore

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

code/.eslintrc

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

code/.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
node_modules/
22
dist/
3-
.prettierrc

code/.prettierrc

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

code/eslint.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
5+
6+
export default [
7+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
8+
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
9+
pluginJs.configs.recommended,
10+
...tseslint.configs.recommended,
11+
eslintPluginPrettierRecommended,
12+
];

code/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"dev": "vite",
4545
"build": "tsc && vite build",
4646
"preview": "vite preview",
47-
"lint": "eslint . --ext .ts,.tsx",
47+
"lint": "eslint .",
4848
"lint:fix": "yarn run lint --fix",
4949
"format:style": "prettier . --write",
5050
"test": "tsc && vitest watch",
@@ -53,18 +53,17 @@
5353
"test:ui": "yarn run test --ui --coverage --open=false"
5454
},
5555
"devDependencies": {
56+
"@eslint/js": "^9.9.0",
5657
"@types/node": "^22.5.2",
57-
"@typescript-eslint/eslint-plugin": "^7.0.0",
58-
"@typescript-eslint/parser": "^6.21.0",
5958
"@vitest/coverage-v8": "^2.0.5",
6059
"@vitest/ui": "^2.0.5",
61-
"eslint": "^8.57.0",
60+
"eslint": "^9.9.0",
6261
"eslint-config-prettier": "^9.1.0",
63-
"eslint-import-resolver-typescript": "^3.6.3",
64-
"eslint-plugin-import": "^2.29.1",
6562
"eslint-plugin-prettier": "^5.2.1",
63+
"globals": "^15.9.0",
6664
"prettier": "^3.3.3",
6765
"typescript": "^5.5.4",
66+
"typescript-eslint": "^8.0.1",
6867
"vite": "^5.4.2",
6968
"vite-plugin-dts": "^4.1.0",
7069
"vitest": "^2.0.5"

code/prettier.config.js

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

0 commit comments

Comments
 (0)