Skip to content

Commit

Permalink
Merge pull request #152 from sota1235/feat-improve-some-settings
Browse files Browse the repository at this point in the history
Feat improve some settings
  • Loading branch information
sota1235 authored Aug 25, 2024
2 parents c815934 + 0b850d5 commit a2c1965
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
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

0 comments on commit a2c1965

Please sign in to comment.