Skip to content

Commit

Permalink
Merge pull request #117 from ncaq/enhance-dev-env
Browse files Browse the repository at this point in the history
build: update: node modules
  • Loading branch information
ncaq authored Mar 12, 2023
2 parents 24e9d22 + b76ba16 commit 0d7894b
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 224 deletions.
18 changes: 12 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
root: true,
ignorePatterns: [".eslintrc.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: `${__dirname}/tsconfig.json`,
Expand All @@ -10,17 +11,22 @@ module.exports = {
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/errors",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:import/errors",
"plugin:import/warnings",
"prettier",
],
rules: {
curly: ["error", "all"],
"@typescript-eslint/return-await": ["error", "in-try-catch"],
// importは同じレイヤーならアルファベット順に
"import/order": ["error", { alphabetize: { order: "asc" } }],
"import/prefer-default-export": "off",
"import/order": [
"error",
{
alphabetize: { order: "asc" }, // importは同じレイヤーならアルファベット順に。
},
],
curly: ["error", "all"], // 副行括弧の省略禁止。

"import/prefer-default-export": "off", // named importの方が分かり易い。
"max-classes-per-file": "off", // 小さなクラスを複数書きたいことがある。
},
};
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"scripts": {
"archive": "git archive HEAD --output=google-search-title-qualified.tar.gz",
"build": "ts-node manifest.json.make.ts && esbuild --bundle --outdir=dist --target=firefox102 src/background/main.ts src/content/main.ts",
"fix": "run-p --print-label fix:*",
"fix": "FORCE_COLOR=1 run-p --print-label --continue-on-error fix:*",
"fix:eslint": "yarn lint:eslint --fix",
"fix:prettier": "yarn lint:prettier --write",
"lint": "run-p --print-label lint:*",
"lint:eslint": "eslint --ignore-path .gitignore --cache --ext .ts --ext .tsx .",
"lint:prettier": "prettier --ignore-path .gitignore --check **/*.ts",
"lint": "FORCE_COLOR=1 run-p --print-label --continue-on-error lint:*",
"lint:eslint": "eslint --ignore-path .gitignore --cache --ext .js --ext .jsx --ext .ts --ext .tsx .",
"lint:prettier": "prettier --ignore-path .gitignore --ignore-unknown --check '**/*.{js,jsx,ts,tsx,json,html,css,less,sass,scss,yml,yaml}'",
"lint:tsc": "tsc --noEmit",
"lint:web-ext": "web-ext lint",
"package": "rm -rf dist/ && yarn build && web-ext build",
Expand Down
1 change: 1 addition & 0 deletions web-ext-config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require("fs");

const dir = fs.readdirSync(__dirname);
Expand Down
Loading

0 comments on commit 0d7894b

Please sign in to comment.