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

Feat improve some settings #152

Merged
merged 3 commits into from
Aug 25, 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
9 changes: 6 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/index.js",
"type": "module",
"scripts": {
"lint": "eslint",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"format": "npm run lint:fix && prettier . --write"
},
Expand All @@ -21,16 +21,16 @@
"@types/eslint__js": "8.42.3",
"@typescript-eslint/eslint-plugin": "8.2.0",
"@typescript-eslint/parser": "8.2.0",
"eslint": "9.9.0",
"eslint-config-prettier": "9.1.0",
"eslint": ">= 9",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "^7.35.0",
"globals": "^15.9.0",
"typescript-eslint": "8.2.0"
},
"devDependencies": {
"@types/eslint": "9.6.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
"typescript": "5.5.4"
},
"peerDependencies": {
"eslint": ">= 9"
Expand Down
4 changes: 2 additions & 2 deletions src/base.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// @ts-check
import eslint from "@eslint/js";
import prettier from "eslint-plugin-prettier/recommended";
import globals from "globals";

/**
* @param { { tsconfigPath?: string } } options
* @return { import("eslint").Linter.FlatConfig[] }
* @return { import("eslint").Linter.Config[] }
*/
export default () => [
eslint.configs.recommended,
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// @ts-check
import base from "./base.js";
import typescript from "./typescript.js";
import react from "./react.js";

/**
* @return { import("eslint").Linter.Config[] }
*/
export const configs = {
base,
typescript,
Expand Down
3 changes: 2 additions & 1 deletion src/react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// @ts-check
import base from "./base.js";
import react from "eslint-plugin-react";
import globals from "globals";

/**
* @return { import("eslint").Linter.FlatConfig[] }
* @return { import("eslint").Linter.Config[] }
*/
export default () => [
...base(),
Expand Down
3 changes: 2 additions & 1 deletion src/typescript.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// @ts-check
import tseslint from "typescript-eslint";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import base from "./base.js";

/**
* @param { { tsconfigPath?: string } } options
* @return { import("eslint").Linter.FlatConfig[] }
* @return { import("eslint").Linter.Config[] }
*/
export default ({ tsconfigPath = "./tsconfig.json" }) => [
...base(),
Expand Down
Loading