Skip to content

Commit

Permalink
feat: Remove deprecated rule settings (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
wakamsha authored Jun 6, 2024
1 parent a512fed commit b264582
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 513 deletions.
29 changes: 0 additions & 29 deletions rules/best-practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ module.exports = {
// https://eslint.org/docs/rules/dot-notation
'dot-notation': ['error', { allowKeywords: true }],

// enforces consistent newlines before or after dots
// https://eslint.org/docs/rules/dot-location
'dot-location': ['error', 'property'],

// require the use of === and !==
// https://eslint.org/docs/rules/eqeqeq
eqeqeq: ['error', 'always', { null: 'ignore' }],
Expand Down Expand Up @@ -151,18 +147,10 @@ module.exports = {
// https://eslint.org/docs/rules/no-fallthrough
'no-fallthrough': ['error'],

// disallow the use of leading or trailing decimal points in numeric literals
// https://eslint.org/docs/rules/no-floating-decimal
'no-floating-decimal': ['error'],

// disallow reassignments of native objects or read-only globals
// https://eslint.org/docs/rules/no-global-assign
'no-global-assign': ['error', { exceptions: [] }],

// deprecated in favor of no-global-assign
// https://eslint.org/docs/rules/no-native-reassign
'no-native-reassign': ['off'],

// disallow implicit type conversions
// https://eslint.org/docs/rules/no-implicit-coercion
'no-implicit-coercion': [
Expand Down Expand Up @@ -215,15 +203,6 @@ module.exports = {
},
],

// disallow use of multiple spaces
// https://eslint.org/docs/rules/no-multi-spaces
'no-multi-spaces': [
'error',
{
ignoreEOLComments: false,
},
],

// disallow use of multiline strings
// https://eslint.org/docs/rules/no-multi-str
'no-multi-str': ['error'],
Expand Down Expand Up @@ -342,10 +321,6 @@ module.exports = {
// https://eslint.org/docs/rules/no-return-assign
'no-return-assign': ['error', 'always'],

// disallow redundant `return await`
// https://eslint.org/docs/rules/no-return-await
'no-return-await': ['error'],

// disallow use of `javascript:` urls.
// https://eslint.org/docs/rules/no-script-url
'no-script-url': ['error'],
Expand Down Expand Up @@ -461,10 +436,6 @@ module.exports = {
// https://eslint.org/docs/rules/vars-on-top
'vars-on-top': ['error'],

// require immediate function invocation to be wrapped in parentheses
// https://eslint.org/docs/rules/wrap-iife.html
'wrap-iife': ['error', 'outside', { functionPrototypeMethods: false }],

// require or disallow Yoda conditions
// https://eslint.org/docs/rules/yoda
yoda: ['error'],
Expand Down
17 changes: 0 additions & 17 deletions rules/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,6 @@ module.exports = {
// https://eslint.org/docs/rules/no-extra-boolean-cast
'no-extra-boolean-cast': ['error'],

// disallow unnecessary parentheses
// https://eslint.org/docs/rules/no-extra-parens
'no-extra-parens': [
'off',
'all',
{
conditionalAssign: true,
nestedBinaryExpressions: false,
returnAssign: false,
ignoreJSX: 'all', // delegate to eslint-plugin-react
enforceForArrowConditionals: false,
},
],

// disallow unnecessary semicolons
'no-extra-semi': ['error'],

// disallow overwriting functions written as function declarations
'no-func-assign': ['error'],

Expand Down
37 changes: 0 additions & 37 deletions rules/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,13 @@ module.exports = {
// https://eslint.org/docs/rules/arrow-parens
'arrow-parens': ['error', 'always'],

// require space before/after arrow function's arrow
// https://eslint.org/docs/rules/arrow-spacing
'arrow-spacing': ['error', { before: true, after: true }],

// verify super() callings in constructors
'constructor-super': 'error',

// enforce the spacing around the * in generator functions
// https://eslint.org/docs/rules/generator-star-spacing
'generator-star-spacing': ['error', { before: false, after: true }],

// disallow modifying variables of class declarations
// https://eslint.org/docs/rules/no-class-assign
'no-class-assign': 'error',

// disallow arrow functions where they could be confused with comparisons
// https://eslint.org/docs/rules/no-confusing-arrow
'no-confusing-arrow': [
'error',
{
allowParens: true,
},
],

// disallow modifying variables that are declared using const
'no-const-assign': ['error'],

Expand All @@ -61,10 +44,6 @@ module.exports = {
// replaced by https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
'no-duplicate-imports': ['off'],

// disallow symbol constructor
// https://eslint.org/docs/rules/no-new-symbol
'no-new-symbol': ['error'],

// Disallow specified names in exports
// https://eslint.org/docs/rules/no-restricted-exports
'no-restricted-exports': [
Expand Down Expand Up @@ -170,10 +149,6 @@ module.exports = {
// https://eslint.org/docs/rules/prefer-numeric-literals
'prefer-numeric-literals': ['error'],

// suggest using Reflect methods where applicable
// https://eslint.org/docs/rules/prefer-reflect
'prefer-reflect': ['off'],

// use rest parameters instead of arguments
// https://eslint.org/docs/rules/prefer-rest-params
'prefer-rest-params': ['error'],
Expand All @@ -186,10 +161,6 @@ module.exports = {
// https://eslint.org/docs/rules/prefer-template
'prefer-template': ['error'],

// enforce spacing between object rest-spread
// https://eslint.org/docs/rules/rest-spread-spacing
'rest-spread-spacing': ['error', 'never'],

// import sorting
// https://eslint.org/docs/rules/sort-imports
'sort-imports': [
Expand All @@ -205,13 +176,5 @@ module.exports = {
// require a Symbol description
// https://eslint.org/docs/rules/symbol-description
'symbol-description': ['error'],

// enforce usage of spacing in template strings
// https://eslint.org/docs/rules/template-curly-spacing
'template-curly-spacing': ['error'],

// enforce spacing around the * in yield* expressions
// https://eslint.org/docs/rules/yield-star-spacing
'yield-star-spacing': ['error', 'after'],
},
};
Loading

0 comments on commit b264582

Please sign in to comment.