@mnx.p/eslint-config
v1.0.0
Published
shared eslint and prettier config for mnx repositories
Downloads
112
Readme
@mnx.p/eslint-config
Shared ESLint configuration for mnx repositories.
This package exports the root ESLint config from index.js, which re-exports the shared rules in .eslintrc.js.
Installation
Install the package and its peer dependencies in the project that will use it:
npm install --save-dev @mnx.p/eslint-config eslint prettier \
@stylistic/eslint-plugin @typescript-eslint/eslint-plugin \
@typescript-eslint/parser eslint-config-prettier eslint-plugin-prettierUsage
Extend the config from your project-level ESLint config.
.eslintrc.js
module.exports = {
extends: ['@mnx.p/eslint-config'],
};If your project needs extra rules, add them after extending the shared config.
What it includes
The shared config currently:
- uses
@typescript-eslint/parser - enables
plugin:prettier/recommended - ignores
node_modules,.aws-sam, anddist - enforces
eqeqeq - enforces
@typescript-eslint/explicit-module-boundary-types - disallows extra semicolons with
@stylistic/no-extra-semi - applies Prettier settings for:
- semicolons
- single quotes
- trailing commas where valid
printWidth: 120tabWidth: 4
Package contents
index.js- package entry point.eslintrc.js- shared ESLint configurationpackage.json- package metadata and dependency declarations
Notes
- The package is published as a small CommonJS config package.
- There is no build step.
- There is no test suite defined in
package.json.
