Skip to content

Commit

Permalink
meta: update caching and eslint configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Sep 27, 2023
1 parent 8c66599 commit c1d7e8d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 11 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
{
"extends": ["prettier"],
"overrides": [
{
"files": ["public/**/*.js"],
"extends": ["eslint:recommended"],
"env": { "es6": true, "browser": true }
},
{
"files": ["**/*.{js,mjs,ts,tsx}"],
"extends": ["eslint:recommended"],
"env": { "jest": true, "es6": true, "browser": true }
"env": { "es6": true, "node": true }
},
{
"files": ["**/__tests__/*.mjs"],
"extends": ["eslint:recommended"],
"env": { "jest": true, "es6": true, "node": true }
},
{
"files": ["**/*.{mjs,ts,tsx,mdx}"],
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"**/*.{mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"],
"**/*.{js,mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"],
"**/*.css": ["stylelint --allow-empty-input", "prettier --write"],
"**/*.{json,yml}": ["prettier --check --write"]
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"build": "cross-env NODE_NO_WARNINGS=1 next build",
"start": "cross-env NODE_NO_WARNINGS=1 next start",
"deploy": "cross-env NEXT_STATIC_EXPORT=true npm run build",
"lint:js": "eslint \"**/*.{mjs,ts,tsx}\" --cache --cache-strategy content --cache-file .eslintjscache",
"lint:md": "eslint \"**/*.md?(x)\" --cache --cache-strategy content --cache-file .eslintmdcache",
"lint:js": "eslint \"**/*.{js,mjs,ts,tsx}\" --cache --cache-strategy metadata --cache-file .eslintjscache",
"lint:md": "eslint \"**/*.md?(x)\" --cache --cache-strategy metadata --cache-file .eslintmdcache",
"lint:css": "stylelint --allow-empty-input \"**/*.css\"",
"lint": "npm run lint:js && npm run lint:md && npm run lint:css",
"lint:fix": "npm run lint:js -- --fix && npm run lint:md -- --fix && npm run lint:css -- --fix",
"prettier": "prettier \"**/*.{mjs,ts,tsx,md,mdx,json,yml,css,sass,scss}\" --check --cache --cache-strategy content --cache-location=.prettiercache",
"prettier": "prettier \"**/*.{js,mjs,ts,tsx,md,mdx,json,yml,css,sass,scss}\" --check --cache --cache-strategy metadata --cache-location=.prettiercache",
"prettier:fix": "npm run prettier -- --write",
"format": "npm run lint:fix && npm run prettier:fix",
"storybook": "cross-env NODE_NO_WARNINGS=1 storybook dev -p 6006 --quiet --no-open",
Expand Down

0 comments on commit c1d7e8d

Please sign in to comment.