Migrate to eslint v9

This commit is contained in:
0x1eef 2024-08-03 04:45:31 -03:00
parent 2123123bfa
commit c2e5925ced
6 changed files with 628 additions and 2868 deletions

View file

@ -1,28 +0,0 @@
module.exports = {
extends: ["standard-with-typescript", "standard-jsx", "prettier"],
parserOptions: {
project: "./tsconfig.json",
},
rules: {
"@typescript-eslint/member-delimiter-style": 2,
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/strict-boolean-expressions": 0,
"@typescript-eslint/no-floating-promises": 0,
"@typescript-eslint/prefer-nullish-coalescing": 0,
"@typescript-eslint/restrict-template-expressions": 0,
"@typescript-eslint/promise-function-async": 0,
"@typescript-eslint/consistent-type-definitions": 0,
"@typescript-eslint/no-misused-promises": ["error", {"checksConditionals": false}],
"@typescript-eslint/no-redeclare": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/member-delimiter-style": 0,
"import/no-absolute-path": 0,
"no-return-assign": 0,
"no-useless-return": 0,
"quotes": 0,
"object-curly-spacing": 2,
"n/no-callback-literal": 0,
},
};

16
eslint.config.mjs Normal file
View file

@ -0,0 +1,16 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-plugin-prettier/recommended';
export default tseslint.config(
{ignores: ["src/js/types/schema.ts"]},
eslint.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
rules: {
'@typescript-eslint/no-require-imports': 0
},
}
)

3446
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -20,12 +20,13 @@
"esbuild-loader": "^4.2",
"eslint": "^9.8",
"eslint-config-prettier": "^9.1",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.3",
"ts-jest": "^29.2",
"ts-standard": "^12.0.1",
"typescript": "^5.5",
"typescript-eslint": "^8.0.0",
"webpack": "^5.93",
"webpack-cli": "^5.1",
"webpack-merge": "^6.0"

View file

@ -6,7 +6,6 @@ import { useWebService } from "~/hooks/useWebService";
export function App() {
const [response, error] = useWebService();
const t = chrome.i18n.getMessage;
if (response) {
return <ResponseRenderer response={response} />;
} else if (error) {

View file

@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import React from "react";
import { Footer } from "~/components/Footer";
export function Loader() {