@growflow/eslint-config
v10.4.1
Published
Common ESLint configs for Growflow Org.
Downloads
1,650
Readme
GrowFlow Shared ESLint Configuration
Shareable ESLint configuration to apply consistent syntax and styling rules across GrowFlow projects.
Usage
You can install this package and all of its peer dependencies with install-peerdeps:
npx install-peerdeps --dev @growflow/eslint-config
You can then create a .eslintrc.js
file with content similar to the following:
// see https://www.npmjs.com/package/@rushstack/eslint-patch
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
extends: ['@growflow'],
parserOptions: {
project: 'tsconfig.json',
},
};
This will apply the core eslint config settings as well as settings to eslint your tests with Jest. If you are not using Jest or only want to include the core settings for whatever reason, you can extend the core config:
// see https://www.npmjs.com/package/@rushstack/eslint-patch
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
extends: ['@growflow/eslint-config/core'],
parserOptions: {
project: 'tsconfig.json',
},
};
Or if you only want to include the Jest configuration within an .eslintrc.js
within a test
folder, you can do that as well:
// see https://www.npmjs.com/package/@rushstack/eslint-patch
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
extends: ['@growflow/eslint-config/jest']
};
Editor Integration
You should be able to use your favorite editor's (*cough* VS Code) ESLint to easily format your code on save or with the Format command.