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: upgrade to eslint v9 #50

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 0 additions & 55 deletions common/.eslintrc.json

This file was deleted.

67 changes: 67 additions & 0 deletions common/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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
{
// @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
},
},
}
];
16 changes: 8 additions & 8 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// @if typescript
"ts-jest": "^29.2.5",
"@types/jest": "^29.5.13",
"@types/jest": "^29.5.14",
// @endif
},
"scripts": {
Expand Down
5 changes: 0 additions & 5 deletions plugin/test__if_karma_or_jest/unit/.eslintrc__if_babel

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {StageComponent} from 'aurelia-testing';
import {bootstrap} from 'aurelia-bootstrapper';

function fireEvent(el, type, options) {
var o = options || {};
var e = document.createEvent('Event');
const o = options || {};
const e = document.createEvent('Event');
e.initEvent(type, true, true);
Object.keys(o).forEach(apply);
el.dispatchEvent(e);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Users} from '../../src/users';

class HttpStub {
fetch(url) {
var response = this.itemStub;
const response = this.itemStub;
this.url = url;
return new Promise((resolve) => {
resolve({ json: () => response });
Expand All @@ -14,10 +14,10 @@ class HttpStub {

describe('the Users module', () => {
it('sets fetch response to users', async () => {
var http = new HttpStub();
var sut = new Users(http);
var itemStubs = [1];
var itemFake = [2];
const http = new HttpStub();
const sut = new Users(http);
const itemStubs = [1];
const itemFake = [2];

http.itemStub = itemStubs;
await sut.activate();
Expand Down
4 changes: 2 additions & 2 deletions webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

// @if sass
"sass-loader": "^16.0.2",
"sass": "^1.80.3",
"sass": "^1.80.4",
// @endif

// @if stylus
"stylus-loader": "^8.1.1",
"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",
Expand Down
Loading