Skip to content

Commit

Permalink
Migrate to eslint 9 config file format
Browse files Browse the repository at this point in the history
  • Loading branch information
lederer committed Sep 26, 2024
1 parent d7e4627 commit 2a62036
Show file tree
Hide file tree
Showing 4 changed files with 400 additions and 3,559 deletions.
6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

26 changes: 26 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import js from "@eslint/js";
import react from "@eslint-react/eslint-plugin";
import * as tsParser from "@typescript-eslint/parser";

export default [
js.configs.recommended,
{
files: ["**/*.{js,jsx}"],
...react.configs.recommended,
languageOptions: {
parser: tsParser,
},
rules: {
"no-console": "error",
"no-undef": "warn"
}
},
{
files: ["example/**/*.{js,jsx}"],
settings: {
"react-x": {
importSource: "theme-ui"
}
},
}
];
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"watch": "vite build -w",
"test": "vitest run",
"test:watch": "vitest watch",
"lint": "eslint --ext .js,.jsx src example/src",
"lint": "eslint src example/src",
"deploy": "yarn install && yarn run build && cd example && yarn install && yarn run build",
"compile": "tsc"
},
Expand All @@ -43,6 +43,8 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^1.14.2",
"@eslint/js": "^9.11.1",
"@rollup/plugin-eslint": "^9.0.5",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
Expand All @@ -53,10 +55,9 @@
"@typescript-eslint/parser": "^8.7.0",
"csstype": "^3.1.3",
"eslint": "^9.11.1",
"eslint-config-react-app": "^7.0.1",
"jsdom": "^25.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-test-renderer": "^18.3.1",
"typescript": "^5.6.2",
"vite": "^5.4.8",
Expand Down
Loading

0 comments on commit 2a62036

Please sign in to comment.