Configure typescript, eslint and prettier caches (#5990)

This commit is contained in:
Tom Jenkinson
2023-11-22 18:43:51 +00:00
committed by GitHub
parent 6322fc0529
commit 2660d27878
5 changed files with 10 additions and 6 deletions
+1
View File
@@ -26,6 +26,7 @@ coverage/
# eslint
.eslintcache
/cache.tsbuildinfo
# Visual Studio exclusions
*.suo
+1 -1
View File
@@ -20,6 +20,6 @@ module.exports = async (allStagedFiles) => {
eslintFiles.length &&
`eslint --cache --fix ${eslintFiles.map(addQuotes).join(' ')}`,
prettierFiles.length &&
`prettier --write ${prettierFiles.map(addQuotes).join(' ')}`,
`prettier --cache --write ${prettierFiles.map(addQuotes).join(' ')}`,
].filter(Boolean);
};
+3 -3
View File
@@ -40,12 +40,12 @@
"serve": "http-server -o /demo .",
"docs": "doctoc ./docs/API.md && api-documenter markdown -i api-extractor -o api-extractor/api-documenter && rm api-extractor/api-documenter/index.md && npm run docs-md-to-html",
"docs-md-to-html": "generate-md --layout github --input api-extractor/api-documenter --output api-docs",
"lint": "eslint src/ tests/ --ext .js --ext .ts",
"lint": "eslint --cache src/ tests/ --ext .js --ext .ts",
"lint:fix": "npm run lint -- --fix",
"lint:quiet": "npm run lint -- --quiet",
"lint:staged": "lint-staged",
"prettier": "prettier --write .",
"prettier:verify": "prettier --check .",
"prettier": "prettier --cache --write .",
"prettier:verify": "prettier --cache --check .",
"pretest": "npm run lint",
"sanity-check": "npm run lint && npm run prettier:verify && npm run type-check && npm run build && es-check && npm run docs && npm run test:unit",
"start": "npm run dev",
+3 -1
View File
@@ -11,7 +11,9 @@
"lib": ["dom", "es2015"],
"outDir": "./lib/",
"allowSyntheticDefaultImports": true,
"emitDeclarationOnly": true
"emitDeclarationOnly": true,
"incremental": true,
"tsBuildInfoFile": "cache.tsbuildinfo"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist/**/*", "demo/libs/**/*"]
+2 -1
View File
@@ -10,6 +10,7 @@
/* needed for eslint to work for some reason ¯\_()_/¯ */
"tests/**/.eslintrc.js",
"rollup.config.js",
"build-config.js"
"build-config.js",
"lint-staged.config.js"
]
}