Skip to content

Commit

Permalink
fix(internal): resolve bad lint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed May 13, 2020
1 parent e82992c commit 706076e
Showing 1 changed file with 34 additions and 40 deletions.
74 changes: 34 additions & 40 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2019,
sourceType: 'script'
sourceType: 'script',
},
plugins: [
'eslint-plugin',
'filenames',
'import',
'jest',
'node',
'prettier',
'unicorn'
],
plugins: ['eslint-plugin', 'filenames', 'import', 'jest', 'node', 'prettier', 'unicorn'],
extends: [
'eslint:recommended',
'plugin:eslint-comments/recommended',
Expand All @@ -25,7 +17,7 @@ module.exports = {
'plugin:import/warnings',
'plugin:node/recommended',
'plugin:unicorn/recommended',
'prettier'
'prettier',
],
env: {
es6: true,
Expand Down Expand Up @@ -83,7 +75,7 @@ module.exports = {
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }], // Disallow unnecessary template literals.
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }], // Disallow unnecessary template literals.
radix: 'error',
'require-atomic-updates': 'error',
'require-await': 'error',
Expand All @@ -100,13 +92,17 @@ module.exports = {
// eslint-plugin rules:
'eslint-plugin/consistent-output': ['error', 'always'],
'eslint-plugin/no-deprecated-report-api': 'off',
'eslint-plugin/require-meta-docs-url': ['error', {
pattern: 'https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/tree/master/docs/rules/{{name}}.md',
}],
'eslint-plugin/require-meta-docs-url': [
'error',
{
pattern:
'https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/tree/master/docs/rules/{{name}}.md',
},
],
'eslint-plugin/test-case-property-ordering': 'off',

// Filenames:
'filenames/match-regex': ['error', '^[a-z0-9-]+$'], // Kebab-case.
'filenames/match-regex': ['error', '^.?[a-z0-9-]+$'], // Kebab-case.

// Optional jest rules:
'jest/consistent-test-it': 'error',
Expand All @@ -127,39 +123,37 @@ module.exports = {
'jest/valid-title': 'error',

// Optional import rules:
    'import/extensions': 'error',
    'import/first': 'error',
    'import/newline-after-import': 'error',
    'import/no-absolute-path': 'error',
    'import/no-cycle': 'error',
    'import/no-deprecated': 'error',
    'import/no-dynamic-require': 'error',
    'import/no-mutable-exports': 'error',
    'import/no-named-default': 'error',
    'import/no-self-import': 'error',
    'import/no-unassigned-import': 'error',
    'import/no-unused-modules': 'error',
    'import/no-useless-path-segments': 'error',
    'import/no-webpack-loader-syntax': 'error',
'import/extensions': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-absolute-path': 'error',
'import/no-cycle': 'error',
'import/no-deprecated': 'error',
'import/no-dynamic-require': 'error',
'import/no-mutable-exports': 'error',
'import/no-named-default': 'error',
'import/no-self-import': 'error',
'import/no-unassigned-import': 'error',
'import/no-unused-modules': 'error',
'import/no-useless-path-segments': 'error',
'import/no-webpack-loader-syntax': 'error',
'import/unambiguous': 'error',

// Unicorn rules:
'unicorn/prevent-abbreviations': 'off'
'unicorn/prevent-abbreviations': 'off',
},
overrides: [
{
// Test files:
files: ['tests/**/*.js',],
files: ['tests/**/*.js'],
env: { jest: true },
},
{
// Config files:
files: [
'commitlint.config.js'
],
files: ['commitlint.config.js'],
rules: {
'filenames/match-regex': 'off',
}
},
},
{
// Markdown code samples in documentation:
Expand All @@ -168,7 +162,7 @@ module.exports = {
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaFeatures: { legacyDecorators: true }
ecmaFeatures: { legacyDecorators: true },
},
rules: {
// Ignore violations that generally don't matter inside code samples.
Expand All @@ -188,8 +182,8 @@ module.exports = {
'node/no-missing-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'prettier/prettier': ['error', { trailingComma: 'none' }],
'unicorn/filename-case': 'off'
}
}
'unicorn/filename-case': 'off',
},
},
],
};

0 comments on commit 706076e

Please sign in to comment.