@nihalgonsalves/esconfig
v0.10.15
Published
Shared ECMAScript Config (TS, Lint, Prettier)
Downloads
815
Readme
esconfig
Shared ECMAScript Config (TS, Lint, Prettier)
Usage
Install
yarn add -D @nihalgonsalves/esconfig typescript typescript-eslint eslint prettier
tsconfig.json
{ "extends": "@nihalgonsalves/esconfig/tsconfig.shared.json", "compilerOptions": { "outDir": "./build", "rootDir": "./src" }, "include": ["./src"] }
eslint.config.mjs
import tseslint from "typescript-eslint"; import sharedConfig from "@nihalgonsalves/esconfig/eslint.config.shared"; export default tseslint.config( { ignores: [] }, ...sharedConfig, // ... others );
If you're using React:
import tseslint from "typescript-eslint"; import sharedConfig from "@nihalgonsalves/esconfig/eslint.config.react-shared"; export default tseslint.config( { ignores: [] }, ...sharedConfig, // ... others );
package.json
{ "scripts": { "build": "tsc", "lint": "eslint ./src/", "format": "prettier . --write", "format:check": "prettier . --check" } }
Done! Don't forget to run
build
,lint
andformat:check
in your CI workflow.