@leather.io/eslint-config
v0.7.0
Published
Shared eslint configuration
Downloads
164
Maintainers
Readme
Shared eslint configuration
This package contains eslint
configuration to be shared across projects.
Contents
Setup
Install as a dev dependency in packages / apps:
npm i --save-dev @leather.io/eslint-config
Add eslint configuration file:
// .eslintrc.js module.exports = { extends: ['@leather.io/eslint-config', 'universe/native'], // add this if you have typescript in your package / app parserOptions: { project: path.resolve(__dirname, './tsconfig.json'), }, ..., };
Add eslint ignore patterns file:
# .eslintignore !.* node_modules/ .commitlintrc.js .prettierrc.js .eslintrc.js # Custom ignore patterns ...
Add eslint scripts:
// package.json "scripts": { ... "lint": "eslint . --config .eslintrc.js", "lint:fix": "eslint . --config .eslintrc.js --fix" ... }
Usage
Manual usage from command line:
npm run lint npm run lint:fix