Skip to content

feat: add eslint-plugin-unicorn #55

@natterstefan

Description

@natterstefan

Feature Request

Add, besides the Airbnb rules, another popular set of rules from Sindre Sorhus.

Links

Example Config

/* eslint-disable global-require */
/**
 * @type {import('eslint').ESLint.Options}
 */
module.exports = {
  extends: [
    'eslint-config-ns-ts',
    // @see https://nextjs.org/docs/basic-features/eslint
    'plugin:@next/next/core-web-vitals',
    'plugin:@next/next/recommended',
    'plugin:storybook/recommended',
    // @see https://github.com/sindresorhus/eslint-plugin-unicorn
    'plugin:unicorn/recommended',
  ],
  plugins: ['graphql', 'lodash-tree-shakeable-import', 'unicorn'],
  rules: {
    'unicorn/filename-case': [
      'error',
      {
        cases: {
          camelCase: true,
          kebabCase: true,
          pascalCase: true,
        },
      },
    ],
    'unicorn/no-null': 'off',
    'unicorn/no-array-callback-reference': 'off',
    'unicorn/prefer-module': 'off',
    'unicorn/prevent-abbreviations': 'off',

    // 'consistent-return': ['error', { treatUndefinedAsUnspecified: true }],
 },
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions