eslint-config-jhipster

0.0.1 • Public • Published

eslint-config-jhipster

Provides JHipster ESLint shareable configurations used in the JHispter frontend Typescript/Javascript applications.

NPM version Dependency Status code style: prettier Downloads

Overview

It contains frontend framework-agnostic base set of eslint rules. These rules help us to deliver consistent code quality across different frontend framework implementations supported by JHipster.

Extends

To keep consistent code quality across different implementations, JHipster shareable configuration extends the following set of recommended ESLint and Typescript configurations. JHipster uses prettier to keep consistent code formatting.

'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'prettier/@typescript-eslint',
'eslint-config-prettier'

Rules

In addition to the recommended set of configurations, JHipster overrides following rules.

'@typescript-eslint/member-ordering': [
      'error',
      {
        default: [
          'static-field',
          'instance-field',
          'constructor',
          'static-method',
          'instance-method'
        ]
      }
    ],
    '@typescript-eslint/no-parameter-properties': [
      'warn',
      { allows: ['public', 'private', 'protected'] }
    ],
    '@typescript-eslint/no-unused-vars': [
      'warn',
      {
        vars: 'all',
        args: 'none',
        ignoreRestSiblings: false
      }
    ],
    '@typescript-eslint/explicit-member-accessibility': 'off',
    '@typescript-eslint/explicit-function-return-type': 'off',
    '@typescript-eslint/no-explicit-any': 'off',
    '@typescript-eslint/ban-types': 'off',
    '@typescript-eslint/interface-name-prefix': 'off',
    '@typescript-eslint/no-empty-function': 'off',
    '@typescript-eslint/unbound-method': 'off',
    'spaced-comment': ['warn', 'always'],
    'guard-for-in': 'error',
    'no-labels': 'error',
    'no-caller': 'error',
    'no-bitwise': 'error',
    'no-console': ['error', { allow: ['warn', 'error'] }],
    'no-new-wrappers': 'error',
    'no-eval': 'error',
    'no-shadow': 'error',
    'no-new': 'error',
    'no-var': 'error',
    radix: 'error',
    eqeqeq: ['error', 'always', { null: 'ignore' }],
    'prefer-const': 'error',
    'object-shorthand': ['error', 'always', { avoidExplicitReturnArrows: true }]

License

Apache-2.0 © Vishal Mahajan

Package Sidebar

Install

npm i eslint-config-jhipster

Weekly Downloads

3,062

Version

0.0.1

License

Apache-2.0

Unpacked Size

6.88 kB

Total Files

6

Last publish

Collaborators

  • deepu105
  • jdubois
  • pascalgrimaud
  • vishal423