The Node.js® Website

meta: update caching and eslint configs

+11 -1
.eslintrc.json
··· 2 2 "extends": ["prettier"], 3 3 "overrides": [ 4 4 { 5 + "files": ["public/**/*.js"], 6 + "extends": ["eslint:recommended"], 7 + "env": { "es6": true, "browser": true } 8 + }, 9 + { 5 10 "files": ["**/*.{js,mjs,ts,tsx}"], 6 11 "extends": ["eslint:recommended"], 7 - "env": { "jest": true, "es6": true, "browser": true } 12 + "env": { "es6": true, "node": true } 13 + }, 14 + { 15 + "files": ["**/__tests__/*.mjs"], 16 + "extends": ["eslint:recommended"], 17 + "env": { "jest": true, "es6": true, "node": true } 8 18 }, 9 19 { 10 20 "files": ["**/*.{mjs,ts,tsx,mdx}"],
+1 -1
.lintstagedrc.json
··· 1 1 { 2 - "**/*.{mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"], 2 + "**/*.{js,mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"], 3 3 "**/*.css": ["stylelint --allow-empty-input", "prettier --write"], 4 4 "**/*.{json,yml}": ["prettier --check --write"] 5 5 }
+3 -3
package.json
··· 24 24 "build": "cross-env NODE_NO_WARNINGS=1 next build", 25 25 "start": "cross-env NODE_NO_WARNINGS=1 next start", 26 26 "deploy": "cross-env NEXT_STATIC_EXPORT=true npm run build", 27 - "lint:js": "eslint \"**/*.{mjs,ts,tsx}\" --cache --cache-strategy content --cache-file .eslintjscache", 28 - "lint:md": "eslint \"**/*.md?(x)\" --cache --cache-strategy content --cache-file .eslintmdcache", 27 + "lint:js": "eslint \"**/*.{js,mjs,ts,tsx}\" --cache --cache-strategy metadata --cache-file .eslintjscache", 28 + "lint:md": "eslint \"**/*.md?(x)\" --cache --cache-strategy metadata --cache-file .eslintmdcache", 29 29 "lint:css": "stylelint --allow-empty-input \"**/*.css\"", 30 30 "lint": "npm run lint:js && npm run lint:md && npm run lint:css", 31 31 "lint:fix": "npm run lint:js -- --fix && npm run lint:md -- --fix && npm run lint:css -- --fix", 32 - "prettier": "prettier \"**/*.{mjs,ts,tsx,md,mdx,json,yml,css,sass,scss}\" --check --cache --cache-strategy content --cache-location=.prettiercache", 32 + "prettier": "prettier \"**/*.{js,mjs,ts,tsx,md,mdx,json,yml,css,sass,scss}\" --check --cache --cache-strategy metadata --cache-location=.prettiercache", 33 33 "prettier:fix": "npm run prettier -- --write", 34 34 "format": "npm run lint:fix && npm run prettier:fix", 35 35 "storybook": "cross-env NODE_NO_WARNINGS=1 storybook dev -p 6006 --quiet --no-open",