@manuscripts/eslint-config

0.5.1 • Public • Published

Manuscripts ESLint config

Shared ESLint config for Manuscripts projects.

Install

Use the following command to install ESLint, this shared config and the plugins needed as dev dependencies:

yarn add --dev eslint typescript \
    @typescript-eslint/eslint-plugin @typescript-eslint/parser \
    eslint-plugin-prettier eslint-config-prettier \
    eslint-plugin-import eslint-plugin-simple-import-sort \
    eslint-plugin-react eslint-plugin-react-hooks \
    eslint-plugin-header eslint-plugin-jest  \
    eslint-plugin-promise eslint-plugin-node \
    eslint-plugin-jsx-a11y \
    eslint-plugin-mdx \
    @manuscripts/eslint-config

Usage

Use the following in a project's .eslintrc.js file (or eslintConfig section in package.json):

module.exports = {
  extends: '@manuscripts/eslint-config',
  parserOptions: {
    project: './tsconfig.json',
  },
}

License header

The header/header rule enforces a short Apache 2.0 license header at the start of every file.

To add the missing file header to all files in a project, run eslint --ext .ts,.tsx src --fix

To disable this rule, add the following to the "rules" section of the project's ESLint config:

  "header/header": false

Readme

Keywords

none

Package Sidebar

Install

npm i @manuscripts/eslint-config

Weekly Downloads

116

Version

0.5.1

License

Apache-2.0

Unpacked Size

17.6 kB

Total Files

6

Last publish

Collaborators

  • maci