diff --git a/common/.eslintrc.json b/common/.eslintrc.json deleted file mode 100644 index aaead5a..0000000 --- a/common/.eslintrc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "root": true, - - // @if babel - "extends": "eslint:recommended", - "parser": "@babel/eslint-parser", - // @endif - - // @if typescript - "parser": "@typescript-eslint/parser", // Specifies the ESLint parser - "plugins": ["@typescript-eslint"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - // @endif - - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module", - // @if babel - "ecmaFeatures": { - "legacyDecorators": true - } - // @endif - // @if typescript - "project": "./tsconfig.json", - "tsconfigRootDir": ".", - // @endif - }, - - "rules": { - "no-unused-vars": 0, - // @if typescript - "@typescript-eslint/no-unused-vars": 0, - "@typescript-eslint/no-explicit-any": 0, - // @endif - "no-prototype-builtins": 0, - "no-console": 0, - "getter-return": 0 - }, - - "env": { - "es6": true, - "browser": true, - "node": true, - // @if karma - "jasmine": true, - // @endif - // @if jest - "jest": true, - // @endif - } -} \ No newline at end of file diff --git a/common/eslint.config.mjs b/common/eslint.config.mjs new file mode 100644 index 0000000..025f63e --- /dev/null +++ b/common/eslint.config.mjs @@ -0,0 +1,68 @@ +import eslint from "@eslint/js"; +// @if babel +import babelParser from "@babel/eslint-parser"; +// @endif +// @if typescript +import tseslint from 'typescript-eslint'; +import tsParser from "@typescript-eslint/parser"; +// @endif +import globals from "globals"; + +export default [ + eslint.configs.recommended, + // @if typescript + ...tseslint.configs.recommended, + // @endif + { + root: true, + // @if typescript + files: ["**/*.ts"], + // @endif + + rules: { + "no-unused-vars": 0, + // @if typescript + "@typescript-eslint/no-unused-vars": 0, + "@typescript-eslint/no-explicit-any": 0, + // @endif + "no-prototype-builtins": 0, + "no-console": 0, + "getter-return": 0 + }, + + languageOptions: { + globals: { + ...globals.builtin, + ...globals.nodeBuiltin, + ...globals.browser, + ...globals.node, + // @if karma + ...globals.jasmine, + // @endif + // @if jest + ...globals.jest, + // @endif + }, + + // @if babel + parser: babelParser, + // @endif + // @if typescript + parser: tsParser, + // @endif + ecmaVersion: 2019, + sourceType: "module", + parserOptions: { + // @if babel + ecmaFeatures: { + legacyDecorators: true + }, + // @endif + // @if typescript + project: "./tsconfig.json", + tsconfigRootDir: ".", + // @endif + }, + }, + } +]; diff --git a/common/package.json b/common/package.json index 87b08d5..591cae4 100644 --- a/common/package.json +++ b/common/package.json @@ -14,7 +14,8 @@ }, // @endif "devDependencies": { - "eslint": "^8.43.0", + "eslint": "^9.13.0", + "globals": "^15.10.0", "aurelia-cli": "^3.0.3", "aurelia-testing": "^1.1.0", "gulp": "^4.0.2", @@ -28,21 +29,20 @@ // @endif // @if babel - "@babel/eslint-parser": "^7.25.8", - "@babel/plugin-proposal-decorators": "^7.25.7", + "@babel/eslint-parser": "^7.25.9", + "@babel/plugin-proposal-decorators": "^7.25.9", "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/preset-env": "^7.25.8", + "@babel/preset-env": "^7.25.9", "@babel/core": "^7.25.8", - "@babel/register": "^7.25.7", + "@babel/register": "^7.25.9", "regenerator-runtime": "^0.14.1", // @endif // @if typescript "typescript": "^5.6.3", "tslib": "^2.8.0", - "@types/node": "^22.7.8", - "@typescript-eslint/eslint-plugin": "^8.11.0", - "@typescript-eslint/parser": "^8.11.0", + "@types/node": "^22.7.9", + "typescript-eslint": "^8.8.1", // @endif }, // @if postcss || babel diff --git a/jest/package.json b/jest/package.json index 0b9bf5e..9689de7 100644 --- a/jest/package.json +++ b/jest/package.json @@ -12,7 +12,7 @@ // @if typescript "ts-jest": "^29.2.5", - "@types/jest": "^29.5.13", + "@types/jest": "^29.5.14", // @endif }, "scripts": { diff --git a/webpack/package.json b/webpack/package.json index de31387..c2e2968 100644 --- a/webpack/package.json +++ b/webpack/package.json @@ -28,7 +28,7 @@ // @if sass "sass-loader": "^16.0.2", - "sass": "^1.80.3", + "sass": "^1.80.4", // @endif // @if stylus @@ -36,7 +36,7 @@ "stylus": "^0.64.0", // @endif - "html-webpack-plugin": "^5.6.2", + "html-webpack-plugin": "^5.6.3", "copy-webpack-plugin": "^12.0.2", "mini-css-extract-plugin": "^2.9.1", "aurelia-webpack-plugin": "^5.0.6",