style-lint-js
v1.1.0
Published
Lint and style checker using ESLint and Prettier with default rules that can be extended.
Downloads
14
Readme
Style Lint JS
Installs and configure default linter and style checker for javascript and/or typescript projects.
Using ESLint and Prettier with default rules and as seen here:
ESLint rules:
Install
To generate default config files in your project, run
npx style-lint-js init
# OR for typescript projects
npx style-lint-js init-ts
Once installed, you can run eslint
or prettier
commands as normal ie npx eslint file-to-lint.js
or add to your package.json script.
Note: When initialising for typescript projects, you will need to have typescript installed already in your project for the typescript eslint rules to work.
Additional Rules or Override
Update the rc
file to add or override default rules.
ie
const rules = require('style-lint-js/.eslintrc');
rules.rules = {
...rules.rules,
...{
'import/newline-after-import': 'error',
}
}
module.exports = rules;