0.5.1 • Published 1 year ago

@manuscripts/eslint-config v0.5.1

Weekly downloads
82
License
Apache-2.0
Repository
github
Last release
1 year ago

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
0.5.0

1 year ago

0.5.1

1 year ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago