Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure typescript, eslint and prettier caches #5990

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ coverage/

# eslint
.eslintcache
/cache.tsbuildinfo

# Visual Studio exclusions
*.suo
Expand Down
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion tsconfig-lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/**/*"]
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
Loading