1.4.0 • Published 2 years ago

@mskcc/eslint-config v1.4.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

@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" pathDescriptionfile types
ES6@mskccES6 base (must be at the end of the arrayjs
React@mskcc/eslint-config/reactReact rules (airbnb)js, jsx
React with TypeScript@mskcc/eslint-config/typescriptReact and TypeScript rules (airbnb)ts, tsx
Markdown@mskcc/eslint-config/markdownMarkdown rulesmd,mdx
Vue@mskcc/eslint-config/vueVue rulesvue

Nuances

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

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