Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add eslint-plugin-unicorn #55

Open
natterstefan opened this issue Mar 18, 2022 · 0 comments
Open

feat: add eslint-plugin-unicorn #55

natterstefan opened this issue Mar 18, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@natterstefan
Copy link
Owner

natterstefan commented Mar 18, 2022

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 }],
 },
}
@natterstefan natterstefan added the enhancement New feature or request label Mar 18, 2022
@natterstefan natterstefan self-assigned this Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant