2.0.0-rc.1 • Published 4 years ago

eslint-config-chop-chop v2.0.0-rc.1

Weekly downloads
37
License
MIT
Repository
gitlab
Last release
4 years ago

Usage

Installation

yarn add --dev eslint-config-chop-chop @typescript-eslint/eslint-plugin eslint-plugin-sonarjs eslint-plugin-react-hooks eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-import

.eslintrc.js

module.exports = {
    extends: ['chop-chop'], // or 'chop-chop/with-formatting-rules'
    settings: {
        'import/resolver': {
            node: {
                extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
            },
        },
    },
    overrides: [
        {
            files: ['{*.,}{story,spec,test}.{tsx,ts,mdx}'],
            rules: {
                'import/no-default-export': 'off',
                'sonarjs/no-duplicate-string': 'off',
            },
        },
    ],
};

Linting

yarn eslint src

Configs

  • default -- Recommended config. Prefer Prettier over ESLint formatting rules.
  • with-formatting-rules -- Legacy config. Contains formatting rules.