Skip to content

Commit

Permalink
Cleanup deprecated rules
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-vasconcelos committed May 28, 2024
1 parent e176fde commit 5de9dcc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 271 deletions.
143 changes: 12 additions & 131 deletions rules/next.rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

/* * */

import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import perfectionist from 'eslint-plugin-perfectionist';
import perfectionistNatural from 'eslint-plugin-perfectionist/configs/recommended-natural';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslint from '@eslint/js'
import stylistic from '@stylistic/eslint-plugin'
import perfectionist from 'eslint-plugin-perfectionist'
import perfectionistNatural from 'eslint-plugin-perfectionist/configs/recommended-natural'
import globals from 'globals'
import tseslint from 'typescript-eslint'

/* * */

Expand Down Expand Up @@ -57,135 +57,16 @@ export default tseslint.config(
files: [
'**/*.js', '**/*.ts', '**/*.tsx', '**/*.jsx',
],

rules: {
'array-bracket-newline': [
'error', 'consistent',
],
'array-bracket-spacing': [
'error', 'never',
],
'array-element-newline': [
'error', 'consistent',
],
'arrow-parens': [
'error', 'always',
],
'arrow-spacing': 'error',
'block-spacing': [
'error', 'always',
],
'brace-style': [
'error', '1tbs', { allowSingleLine: true },
],
'comma-dangle': [
'error', 'always-multiline',
],
'comma-spacing': [
'error', { after: true, before: false },
],
'comma-style': [
'error', 'last',
],
'computed-property-spacing': [
'error', 'never',
],
'dot-location': [
'error', 'property',
],
'func-call-spacing': [
'error', 'never',
],
'function-call-argument-newline': [
'error', 'consistent',
],
'function-paren-newline': [
'error', 'consistent',
],
'generator-star-spacing': [
'error', { after: true, before: false },
],
'jsx-quotes': [
'error', 'prefer-double',
],
'key-spacing': [
'error', { afterColon: true, beforeColon: false },
],
'keyword-spacing': [
'error', { after: true, before: true },
],
'linebreak-style': [
'error', 'unix',
],
'lines-between-class-members': [
'error', 'always',
'@stylistic/indent': [
'error', 'tab',
],
'new-parens': [
'error', 'never',
'@stylistic/no-tabs': [
'error', { allowIndentationTabs: true },
],
'no-extra-parens': [
'error', 'all', { nestedBinaryExpressions: false },
],
'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': [
'error', { max: 1, maxBOF: 0 },
],
'no-trailing-spaces': 'error',
'no-unused-vars': 'warn',
'no-var': 'error',
'no-whitespace-before-property': 'error',
'nonblock-statement-body-position': [
'error', 'beside',
],
'object-curly-newline': [
'error', { consistent: true, multiline: true },
],
'object-curly-spacing': [
'error', 'always',
],
'object-property-newline': [
'error', { allowAllPropertiesOnSameLine: true },
],
'operator-linebreak': [
'error', 'after',
],
'padded-blocks': [
'error', 'never',
],
'quotes': [
'error', 'single', { allowTemplateLiterals: true, avoidEscape: true },
],
'rest-spread-spacing': [
'error', 'never',
],
'space-before-blocks': [
'error', 'always',
],
'space-before-function-paren': [
'error', { anonymous: 'always', asyncArrow: 'always', named: 'never' },
],
'space-in-parens': [
'error', 'never',
],
'space-infix-ops': 'error',
'space-unary-ops': [
'error', { nonwords: false, words: true },
],
'switch-colon-spacing': [
'error', { after: true, before: false },
],
'template-curly-spacing': [
'error', 'never',
],
'template-tag-spacing': [
'error', 'never',
],
'wrap-iife': [
'error', 'inside',
],
'yield-star-spacing': [
'error', { after: true, before: false },
],
},
},

)
152 changes: 12 additions & 140 deletions rules/node.rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

/* * */

import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import perfectionist from 'eslint-plugin-perfectionist';
import perfectionistNatural from 'eslint-plugin-perfectionist/configs/recommended-natural';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslint from '@eslint/js'
import stylistic from '@stylistic/eslint-plugin'
import perfectionist from 'eslint-plugin-perfectionist'
import perfectionistNatural from 'eslint-plugin-perfectionist/configs/recommended-natural'
import globals from 'globals'
import tseslint from 'typescript-eslint'

/* * */

Expand Down Expand Up @@ -58,143 +58,15 @@ export default tseslint.config(
'**/*.js', '**/*.ts', '**/*.tsx', '**/*.jsx',
],
rules: {

'@stylistic/indent': ['error', 'tab'],

'@stylistic/no-tabs': [
'error', { allowIndentationTabs: true },
],

'array-bracket-newline': [
'error', 'consistent',
],
'array-bracket-spacing': [
'error', 'never',
],
'array-element-newline': [
'error', 'consistent',
],
'arrow-parens': [
'error', 'always',
],
'arrow-spacing': 'error',
'block-spacing': [
'error', 'always',
],
'brace-style': [
'error', '1tbs', { allowSingleLine: true },
],
'comma-dangle': [
'error', 'always-multiline',
],
'comma-spacing': [
'error', { after: true, before: false },
],
'comma-style': [
'error', 'last',
],
'computed-property-spacing': [
'error', 'never',
],
'dot-location': [
'error', 'property',
],
'func-call-spacing': [
'error', 'never',
],
'function-call-argument-newline': [
'error', 'consistent',
],
'function-paren-newline': [
'error', 'consistent',
],
'generator-star-spacing': [
'error', { after: true, before: false },
],
'indent': [
'@stylistic/indent': [
'error', 'tab',
],
'jsx-quotes': [
'error', 'prefer-double',
],
'key-spacing': [
'error', { afterColon: true, beforeColon: false },
],
'keyword-spacing': [
'error', { after: true, before: true },
],
'linebreak-style': [
'error', 'unix',
],
'lines-between-class-members': [
'error', 'always',
],
'new-parens': [
'error', 'never',
],
'no-extra-parens': [
'error', 'all', { nestedBinaryExpressions: false },
],
'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': [
'error', { max: 1, maxBOF: 0 },
'@stylistic/no-tabs': [
'error', { allowIndentationTabs: true },
],
'no-trailing-spaces': 'error',
'no-unused-vars': 'warn',
'no-var': 'error',
'no-whitespace-before-property': 'error',
'nonblock-statement-body-position': [
'error', 'beside',
],
'object-curly-newline': [
'error', { consistent: true, multiline: true },
],
'object-curly-spacing': [
'error', 'always',
],
'object-property-newline': [
'error', { allowAllPropertiesOnSameLine: true },
],
'operator-linebreak': [
'error', 'after',
],
'padded-blocks': [
'error', 'never',
],
'quotes': [
'error', 'single', { allowTemplateLiterals: true, avoidEscape: true },
],
'rest-spread-spacing': [
'error', 'never',
],
'space-before-blocks': [
'error', 'always',
],
'space-before-function-paren': [
'error', { anonymous: 'always', asyncArrow: 'always', named: 'never' },
],
'space-in-parens': [
'error', 'never',
],
'space-infix-ops': 'error',
'space-unary-ops': [
'error', { nonwords: false, words: true },
],
'switch-colon-spacing': [
'error', { after: true, before: false },
],
'template-curly-spacing': [
'error', 'never',
],
'template-tag-spacing': [
'error', 'never',
],
'wrap-iife': [
'error', 'inside',
],
'yield-star-spacing': [
'error', { after: true, before: false },
],
},
},
);

)

0 comments on commit 5de9dcc

Please sign in to comment.