1.1.0 • Published 5 years ago
@volusion/eslint-config v1.1.0
Volusion ESLint Configs
Shareable ESLint configuration files
How to use it
- Install the package as a development dependency:
npm install --save-dev @volusion/eslint-config- Create an eslint config file in your project, with
@volusion/eslint-configas an extension.
.eslintrc.js:
module.exports = {
"extends": [
"@volusion/eslint-config"
],
"rules": {
// Place custom overrides for your project here.
}
}Advanced Usage
To use something other than the default config, update your configuration to match the name of the config file in this repo that you want to extend.
For a typescript project, your config might look like this:
.eslintrc.js:
module.exports = {
"extends": [
"@volusion/eslint-config",
"@volusion/eslint-config/typescript", // matches `typescript.js` in the root of this package.
"@volusion/eslint-config/react", // for react projects, matches `react.js`
],
"rules": {
// Place custom overrides for your project here.
}
}Developer Guide
Modifying an existing config
All configs are located in the lib directory. Find the one you want to modify, and treat it like a standard eslint config file. Keep the individual config scopes small: don't put non-typescript rules in lib/typescript.js, for example.
Adding a new config
- Add your new config file to the
libdirectory. (i.e../lib/react.js) - Add a file to the root of the project to import the config from
lib. ./react.js
module.exports = require("./lib/react.js");File Structure
- Configs are located in
./lib/, then re-exported from the root for consumption by dependent packages. This lets dependents reference individual configs without having to know the file structure of this repo (e.g.@volusion/eslint-config/reactinstead of@volusion/eslint-config/lib/react). ./.eslintrc.jsand./.prettierrc.js(with the preceeding.) are the local configuration files for linting and formatting this repo.
1.1.0
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
1.0.0-alpha.10
5 years ago
1.0.0-alpha.9
5 years ago
1.0.0-alpha.8
5 years ago
1.0.0-alpha.7
5 years ago
1.0.0-alpha.6
5 years ago
1.0.0-alpha.5
5 years ago
1.0.0-alpha.4
5 years ago
1.0.0-alpha.3
5 years ago
1.0.0-alpha.2
5 years ago
1.0.0-alpha.1
5 years ago
1.0.0-alpha.0
5 years ago