This package provides shareable ESLint configurations for JavaScript projects that conform with GoSpotChecks coding style.
To make use of this config, install ESLint (>= 5.8.0) and this package as a development dependency of your project:
npm install eslint eslint-config-gsc --save-dev
Create a file named .eslintrc.js
to your project's root directory. Copy and paste the code below and save.
module.exports = {
"extends": "gsc"
};
The eslint-config-gsc
package includes a number of ESLint configuration profiles for different types of projects.
The "base" config is suitable for JavaScript projects.
Example configuration in .eslintrc.js
:
module.exports = {
"extends": "gsc"
};
The gsc/react
config is suitable for projects using React.
Example configuration in .eslintrc.js
:
module.exports = {
"extends": "gsc/react"
};
To use the stylelint configuration:
- Create a
stylelint.config.js
- Add
module.exports = require('eslint-config-gsc/stylelint');