UNPKG

@braineet/eslint-config

Version:

Shared Eslint configuration for Braineet Frontend projects.

80 lines (79 loc) 2.38 kB
module.exports = { env: { es6: true, node: true, }, parserOptions: { ecmaFeatures: { jsx: true, }, ecmaVersion: 12, sourceType: 'module', }, extends: ['airbnb', 'plugin:prettier/recommended'], rules: { 'arrow-body-style': [2, 'as-needed'], 'class-methods-use-this': 0, 'consistent-return': 0, 'default-param-last': 0, 'max-len': 0, 'newline-per-chained-call': 0, 'no-confusing-arrow': 0, 'no-console': ['error', { allow: ['info', 'warn', 'error'] }], 'no-unused-vars': 2, 'global-require': 0, 'no-use-before-define': 0, 'prefer-template': 2, 'no-restricted-exports': 0, 'import/imports-first': 0, 'import/newline-after-import': 0, 'import/no-dynamic-require': 0, 'import/no-named-as-default': 0, 'import/no-unresolved': 2, 'import/no-webpack-loader-syntax': 0, 'import/prefer-default-export': 0, 'import/order': [ 'error', { groups: [ ['builtin', 'external'], 'internal', 'parent', ['sibling', 'index'], 'object', ], pathGroups: [ { pattern: 'react', group: 'external', position: 'before', }, { pattern: '@/**', group: 'external', position: 'after', }, ], pathGroupsExcludedImportTypes: ['react'], 'newlines-between': 'always', alphabetize: { order: 'asc', caseInsensitive: true, }, }, ], 'import/no-extraneous-dependencies': [ 'error', { devDependencies: [ '**/*.test.js', '**/*.spec.js', '**/*.stories.js', '**/*.stories.new.js', '**/*.config.js', '**/*.cy.js', ], }, ], }, };