@mskcc/eslint-config

1.4.0 • Public • Published

@mskcc/eslint-config

This package provides MSK base eslint configurations to keep code quality consistent with all our teams. Use this as the base to your project. These configurations will be continuously updated.

Installation

  • You will need eslint and @mskcc/eslint-config both installed.
  • No configuration is dependent of each other. You will need to extend each set of configurations.
pnpm install --save-dev eslint // Actual eslint
pnpm install --save-dev @mskcc/eslint-config // configuration file

Usage

Create a .eslintrc.js file in your root directory, then add the appropriate configuration(s):

// Base configuration. Keep at the end!

module.exports = {
  extends: ['@mskcc'],
};
// ReactJS

module.exports = {
  extends: ['@mskcc/eslint-config/react', '@mskcc'],
};
// ReactJS with TypeScript

module.exports = {
  extends: [
    '@mskcc/eslint-config/typescript',
    '@mskcc/eslint-config/react',
    '@mskcc',
  ],
};

Full list of configurations

Type "extends" path Description file types
ES6 @mskcc ES6 base (must be at the end of the array js
React @mskcc/eslint-config/react React rules (airbnb) js, jsx
React with TypeScript @mskcc/eslint-config/typescript React and TypeScript rules (airbnb) ts, tsx
Markdown @mskcc/eslint-config/markdown Markdown rules md,mdx
Vue @mskcc/eslint-config/vue Vue rules vue

Nuances

eslint-config-prettier is needed to make prettier work with eslint.

  extends: [
    ...,
    'plugin:prettier/recommended' // Add this to the very end!
  ],

Package Sidebar

Install

npm i @mskcc/eslint-config

Weekly Downloads

0

Version

1.4.0

License

UNLICENSED

Unpacked Size

5.7 kB

Total Files

8

Last publish

Collaborators

  • nierococ
  • chapmanm
  • walee
  • informatix9
  • jamesmsk