Vendasta Javascript Lint Config
This package provides linting and formatting configuration files for our frontend code.
Currently, this means TSLint, ESLint, and clang-format configurations.
Installation
yarn add --dev @vendasta/lint-config eslint tslint clang-format
It is recommended that you copy the configuration files from this package into the root of your project using the postinstall
script. This is primarily to help IDE's auto discover that these configuration files exist.
Add the NPM scripts to the package.json:
"postinstall": "cp node_modules/@vendasta/lint-config/.clang-format .; cp node_modules/@vendasta/lint-config/.eslintignore .; cp node_modules/@vendasta/lint-config/.eslintrc.yml .; cp node_modules/@vendasta/lint-config/tslint.json .;",
"lint:js": "node_modules/.bin/eslint -c .eslintrc.yml *.js ./src",
"lint:ts": "./node_modules/.bin/tslint --config ./tslint.json --project ./tsconfig.json",
"format": "./node_modules/.bin/clang-format ./src/**/*.ts -i",
Adjust the source folder as necessary for your project.
TODO
- Move our SASS/SCSS linter configuration into this package