Skip to content

[pull] master from airbnb:master #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
6734b78
[eslint config] [*] [deps] update `eslint-plugin-import`, `object.ent…
ljharb Nov 9, 2021
ef6c478
[eslint config] [*] [dev deps] update `@babel/runtime`
ljharb Nov 9, 2021
f3d3a07
[eslint config] [base] [breaking] drop eslint < 7, add eslint 8
ljharb Nov 9, 2021
10a6d02
[meta] use `prepublishOnly` script for npm 7+
ljharb Nov 9, 2021
c12a08c
[actions] fix action working directories
ljharb Nov 9, 2021
96f11d8
[actions] run prepublishOnly in prepublish tests
ljharb Nov 9, 2021
4fc997b
[readme] some updates
ljharb Nov 9, 2021
be6966b
[eslint-config] [meta] add `--no-save` to link scripts
ljharb Nov 9, 2021
eac8cc6
[eslint config] [base] [breaking] add `exports`
ljharb Nov 9, 2021
366bfa6
[eslint config] [base] v15.0.0
ljharb Nov 9, 2021
930a6f2
[eslint config] [*] update `@babel/runtime`, `eslint-plugin-import`
ljharb Nov 10, 2021
37ebbba
[eslint config] [deps] update `eslint-config-airbnb-base`, `eslint-pl…
ljharb Nov 10, 2021
1bc8cab
[eslint config] [breaking] support `eslint` 8; drop `eslint` < 7
ljharb Nov 10, 2021
52e710c
[eslint config] v19.0.0
ljharb Nov 10, 2021
d8cb404
[eslint config] [base] remove unneeded eslint version check
PaperStrike Nov 11, 2021
91cab81
[readme] operator => parameter syntax
Yatin-kathuria Nov 16, 2021
31c6f21
[eslint config] [base] [refactor] make a single source of truth for w…
ljharb Nov 22, 2021
c4000b9
[eslint config] [fix] `whitespace`: udpate to support eslint 8
ljharb Nov 22, 2021
e0bb393
[eslint config] [*] [dev deps] update `tape`
ljharb Nov 22, 2021
97a3238
[eslint config] [deps] update `eslint-plugin-react`
ljharb Nov 22, 2021
c05ffb2
[eslint config] v19.0.1
ljharb Nov 22, 2021
371537f
[Tests] re-enable tests disabled for the eslint 8 upgrade
ljharb Nov 22, 2021
afc2cc3
[eslint config] [meta] fix "exports" path
ljharb Dec 2, 2021
152bd5e
[eslint config] v19.0.2
ljharb Dec 2, 2021
445322d
[eslint config] [deps] update `eslint-plugin-react`
ljharb Dec 22, 2021
38bc026
[eslint config] [base] add disabled `prefer-object-has-own` rule
ljharb Dec 22, 2021
274c8d5
[eslint config] [patch] set `namedComponents` option to match style g…
petersendidit Nov 10, 2021
baaa5e8
[eslint config] v19.0.3
ljharb Dec 24, 2021
d4e39c9
v19.0.4
ljharb Dec 25, 2021
34b5bc3
[meta] revert changes from d4e39c9b10767cc77c7d0091f2eae06a6ccfc33e
ljharb Dec 25, 2021
b4377fb
[meta] better `eclint` command
ljharb Jan 11, 2022
fd2f5a1
[eslint config] [base] [deps] update `@babel/runtime`, `confusing-bro…
ljharb May 3, 2022
7c0f28a
[eslint config] [deps] update `@babel/runtime`, `eslint-find-rules`, …
ljharb May 3, 2022
1677ba6
[eslint config] [meta] update eslint-plugin-react repo URLs
ljharb May 3, 2022
7fdc87a
[guide] fix eslint core rule URLs
terrablue May 3, 2022
42c0e2e
Fix typo in eslint-config-airbnb-base changelog
lencioni May 24, 2022
a0e9405
[eslint config] [*] [dev deps] update `@babel/runtime`
ljharb May 24, 2022
206d25b
[eslint config] [deps] update `eslint-plugin-react`
ljharb May 24, 2022
cbf9ade
[guide] Added period to 4.4 for formatting consistency.
michael-orzel Jul 2, 2021
5155aa5
[eslint config] [base] disable the deprecated `no-spaced-func` rule
haoqunjiang Aug 8, 2022
3cbf96d
[eslint config] [base] `no-alert`: add TODO comment
ljharb Sep 19, 2022
5143a7a
[Dev Deps] update `markdownlint`, `markdownlint-cli`
ljharb Sep 19, 2022
866f441
[eslint config] [*] update `@babel/runtime`, `tape`
ljharb Sep 19, 2022
f6f63b8
[eslint config] [*] [deps] update `object.assign`
ljharb Sep 19, 2022
75a908a
[eslint config] [deps] update `eslint-plugin-jsx-a11y`, `eslint-plugi…
ljharb Sep 19, 2022
7dbb7b1
[eslint config] [base] add disabled `logical-assignment-operators` rule
ljharb Oct 25, 2022
0b1f623
[editorial] convert example to use single instead of double quotes
Oct 25, 2022
ca0ff97
[guide] add Nullish Coalescing operator
Oct 25, 2022
6fb4f8e
[guide] add Optional Chaining
Oct 25, 2022
6947138
[guide] add comma to the end of the property
Oct 26, 2022
c6b1a43
[guide] rename `qux` to `quux`
Oct 26, 2022
d601701
[readme] wayback machine, or remove, broken links
Oct 29, 2022
38f1488
[guide] fix typo in `space-before-blocks`
plplmax Oct 31, 2022
49d08a2
[readme] prefer `const`/`let` over `var` in examples
Oct 29, 2022
1fb7d76
[eslint config] [patch] add new disabled core rules
ljharb Nov 17, 2022
0d747c6
[readme] add space before code blocks
Pushpendra100 Nov 13, 2022
4ef69ed
[Tests] refactor test paths
mertcanaltin Dec 3, 2022
81157ee
[guide] add `Object.hasOwn`
Nov 17, 2022
fd96a4f
[eslint config] [*] [refactor] use object spread instead of `Object.a…
ljharb Dec 30, 2022
8091e39
[*] [dev deps] update `@babel/runtime`, `tape`
ljharb Feb 9, 2023
917c8d9
[*] [deps] update `eslint-plugin-import`
ljharb Feb 9, 2023
bf53656
[eslint config] [deps] update `eslint-plugin-react`, `eslint-plugin-j…
ljharb Feb 9, 2023
5c01a10
[readme] added JavaScript Roadmap link
syedmouaazfarrukh Feb 7, 2023
69fc1bf
spell checking, fixed grammar error.
felipeGarciaDiaz Apr 28, 2023
7982931
[readme] Updates ESLint rule in section 12.3 (exponentiation-operator)
SpraxDev May 2, 2023
0e627e2
[readme] update eslint plugin repo URLs
ljharb May 15, 2023
240a378
[Dev Deps] update `markdownlint`, `markdownlint-cli`
ljharb May 15, 2023
95b6b43
[eslint-config] [*] [dev deps] update `@babel/runtime`
ljharb May 15, 2023
0f3ca32
[eslint config] [*] [deps] update `object.entries`
ljharb May 15, 2023
01f046d
[guide] added second link to eslint rule for item 7.1
zhesha May 23, 2023
7916d6f
[guide] Add documentation for `no-use-before-define` rule under hoist…
ljharb May 15, 2023
fd77bbe
[guide] add nullish-coalescing-operator definition
khadijagardezi Jul 2, 2023
cda44da
[guide] Add commas to Truth, Equality, and JavaScript
morninj Aug 1, 2023
18a08b8
[Dev Deps] update `markdownlint`, `markdownlint-cli`
ljharb Aug 4, 2023
4aee38f
[eslint config] [*] [deps] update `eslint-plugin-import`, `@babel/run…
ljharb Aug 5, 2023
749f4c2
[eslint config] [deps] update `eslint-plugin-react`
ljharb Aug 5, 2023
2fc5e2d
[guide] fix grammar
morninj Aug 2, 2023
cb19177
[readme] correct no-use-before-define justification
hamzahuda Aug 12, 2023
46ae3e2
[readme] Add `Object.hasOwn` to section 3.7
savalaram-redkar Aug 15, 2023
11ab371
[eslint config] [base] [patch] Add a message for `confusing-browser-g…
vmohir Aug 21, 2023
51a37d0
[eslint config] [*] [robustness] cache static builtins
ljharb Jan 28, 2024
e95b1f2
[eslint config] [base] add new disabled rules
ljharb Jan 28, 2024
55899b5
[eslint config] [*] [deps] update deps
ljharb Jan 28, 2024
0681a43
[eslint config] [*] [refactor] remove `object.entries` dependency
43081j Jan 4, 2024
09adc22
[eslint config] [patch] `jsx-a11y/no-noninteractive-tabindex`: allow …
ljharb Jan 30, 2024
b239920
[eslint config] [patch] `jsx-a11y/no-redundant-roles`: allow `nav` to…
ljharb Jan 30, 2024
5f019b1
[eslint config] [*] [dev deps] update `tape`
ljharb Mar 25, 2024
932951a
[eslint config] [deps] update `eslint-plugin-react`
ljharb Mar 25, 2024
f20eca9
[guide] fix compat table URL
muhammedriaz Mar 25, 2024
c25bce8
[readme] replace dead link with archive.org link
khanhadi Apr 7, 2024
7a8f568
[eslint config] [patch] add new disabled react rules
ljharb Sep 21, 2024
e6f2922
[eslint config] [*] [deps] update deps
ljharb Sep 21, 2024
d1705c3
[guide] [css] Added what BEM stands for (Block Element Modifier)
emmanuel-455 Feb 19, 2024
e6080c7
[readme] add ILIAS to users
klees May 11, 2023
39b970f
Add Zit Software to `In the Wild`
thangved Sep 24, 2024
b912288
[readme] Remove dead URLs
Naandalist Sep 21, 2024
f45bd1e
[eslint config] [*] [fix] fix crash in eslint invocation with TIMING …
steelbrain Oct 1, 2024
6499695
[readme] update link to es5 and es6 compat table in readme
matheusfelipeog Oct 13, 2023
11f986f
[eslint config] [deps] update `eslint-plugin-react-hooks`
ptmkenny Dec 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 29 additions & 21 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
versionsAsRoot: true
type: 'majors'
preset: '^10 || ^12 || ^14 || ^16 || >= 17'
preset: '^12 || ^14 || ^16 || >= 17'

base:
needs: [matrix]
Expand All @@ -25,11 +25,14 @@ jobs:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
eslint:
- 8
- 7
- 6
- 5
package:
- eslint-config-airbnb-base
exclude:
- node-version: 10
eslint: 8
package: eslint-config-airbnb-base

defaults:
run:
Expand All @@ -40,7 +43,12 @@ jobs:
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
before_install: cd "packages/${{ matrix.package }}"
node-version: ${{ matrix.node-version }}
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}"
- run: node -pe "require('eslint/package.json').version"
name: 'eslint version'
- run: npm run travis
- uses: codecov/codecov-action@v2

Expand All @@ -54,16 +62,12 @@ jobs:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
eslint:
- 8
- 7
- 6
- 5
package:
- eslint-config-airbnb
react-hooks:
- ''
- 3
- 2.3
- 1.7
- 4

defaults:
run:
Expand All @@ -74,9 +78,12 @@ jobs:
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
before_install: cd "packages/${{ matrix.package }}"
node-version: ${{ matrix.node-version }}
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}"
- run: node -pe "require('eslint/package.json').version"
name: 'eslint version'
- run: npm install --no-save "eslint-plugin-react-hooks@${{ matrix.react-hooks }}"
if: ${{ matrix.react-hooks > 0}}
- run: npm run travis
Expand All @@ -89,9 +96,8 @@ jobs:
fail-fast: false
matrix:
eslint:
- 8
- 7
- 6
- 5
package:
- eslint-config-airbnb-base

Expand All @@ -102,13 +108,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
name: 'nvm install lts/* && npm install'
with:
before_install: cd "packages/${{ matrix.package }}"
node-version: lts/*
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}"
- run: node -pe "require('eslint/package.json').version"
name: 'eslint version'
- run: npm run pretravis
- run: npm run prepublish
- run: npm run prepublishOnly
- run: npm run posttravis

prepublish-react:
Expand All @@ -118,16 +127,12 @@ jobs:
fail-fast: false
matrix:
eslint:
- 8
- 7
- 6
- 5
package:
- eslint-config-airbnb
react-hooks:
- ''
- 3
- 2.3
- 1.7
- 4

defaults:
run:
Expand All @@ -136,15 +141,18 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
name: 'nvm install lts/* && npm install'
with:
before_install: cd "packages/${{ matrix.package }}"
node-version: lts/*
after_install: |
npm install --no-save "eslint@${{ matrix.eslint }}"
- run: npm install --no-save "eslint-plugin-react-hooks@${{ matrix.react-hooks }}"
if: ${{ matrix.react-hooks > 0}}
- run: node -pe "require('eslint/package.json').version"
name: 'eslint version'
- run: npm run pretravis
- run: npm run prepublish
- run: npm run prepublishOnly
- run: npm run posttravis

node:
Expand Down
315 changes: 205 additions & 110 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css-in-javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

- Use an underscore for modifiers to other styles.

> Why? Similar to BEM, this naming convention makes it clear that the styles are intended to modify the element preceded by the underscore. Underscores do not need to be quoted, so they are preferred over other characters, such as dashes.
> Why? Similar to [BEM](https://getbem.com/introduction/), this naming convention makes it clear that the styles are intended to modify the element preceded by the underscore. Underscores do not need to be quoted, so they are preferred over other characters, such as dashes.

```js
// bad
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"homepage": "https://github.com/airbnb/javascript",
"devDependencies": {
"markdownlint": "^0.20.4",
"markdownlint-cli": "^0.23.2"
"markdownlint": "^0.29.0",
"markdownlint-cli": "^0.35.0"
}
}
19 changes: 19 additions & 0 deletions packages/eslint-config-airbnb-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
15.0.0 / 2021-11-08
==================
- [breaking] drop eslint < 7, add eslint 8 (#2495)
- [breaking] add `exports`
- [patch] Improve `function-paren-newline` with `multiline-arguments` option (#2471)
- [patch] update default value for complexity (#2420)
- [patch] add disabled `no-unsafe-optional-chaining` rule
- [patch] arthmetic -> arithmetic (#2341)
- [patch] fix spelling of "than" (#2333)
- [patch] add `no-nonoctal-decimal-escape` rule
- [patch] `import/no-extraneous-dependencies`: Add .eslintrc.js to devDeps (#2329)
- [guide] Spread operator => Spread syntax (#2423)
- [guide] add references for eslint rules (#2419)
- [Docs] HTTP => HTTPS (#2489)
- [readme] some updates
- [meta] use `prepublishOnly` script for npm 7+
- [deps] update `eslint-plugin-import`, `eslint-plugin-react`, `object.entries`
- [dev deps] update `@babel/runtime`, `tape`

14.2.1 / 2020-11-06
==================
- [base] `no-restricted-globals`: add better messages (#2320)
Expand Down
19 changes: 16 additions & 3 deletions packages/eslint-config-airbnb-base/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# eslint-config-airbnb-base
# eslint-config-airbnb-base <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

[![npm version](https://badge.fury.io/js/eslint-config-airbnb-base.svg)](https://badge.fury.io/js/eslint-config-airbnb-base)
[![npm version](https://badge.fury.io/js/eslint-config-airbnb-base.svg)][package-url]

[![github actions][actions-image]][actions-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

This package provides Airbnb's base JS .eslintrc (without React plugins) as an extensible shared config.

Expand Down Expand Up @@ -79,7 +83,7 @@ Lints ES5 and below. Requires `eslint` and `eslint-plugin-import`.
Which produces and runs a command like:

```sh
npm install --save-dev eslint-config-airbnb-base eslint@^3.0.1 eslint-plugin-import@^1.10.3
npm install --save-dev eslint-config-airbnb-base eslint@^#.#.# eslint-plugin-import@^#.#.#
```

2. Add `"extends": "airbnb-base/legacy"` to your .eslintrc
Expand All @@ -97,3 +101,12 @@ Consider adding test cases if you're making complicated rules changes, like anyt
You can run tests with `npm test`.

You can make sure this module lints with itself using `npm run lint`.

[package-url]: https://npmjs.org/package/eslint-config-airbnb-base
[npm-version-svg]: https://versionbadg.es/airbnb/javascript.svg
[license-image]: https://img.shields.io/npm/l/eslint-config-airbnb-base.svg
[license-url]: LICENSE.md
[downloads-image]: https://img.shields.io/npm/dm/eslint-config-airbnb-base.svg
[downloads-url]: https://npm-stat.com/charts.html?package=eslint-config-airbnb-base
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/airbnb/javascript
[actions-url]: https://github.com/airbnb/javascript/actions
44 changes: 28 additions & 16 deletions packages/eslint-config-airbnb-base/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
{
"name": "eslint-config-airbnb-base",
"version": "14.2.1",
"version": "15.0.0",
"description": "Airbnb's base JS ESLint config, following our styleguide",
"main": "index.js",
"exports": {
".": "./index.js",
"./legacy": "./legacy.js",
"./whitespace": "./whitespace.js",
"./rules/best-practices": "./rules/best-practices.js",
"./rules/es6": "./rules/es6.js",
"./rules/node": "./rules/node.js",
"./rules/style": "./rules/style.js",
"./rules/errors": "./rules/errors.js",
"./rules/imports": "./rules/imports.js",
"./rules/strict": "./rules/strict.js",
"./rules/variables": "./rules/variables.js",
"./package.json": "./package.json"
},
"scripts": {
"prelint": "eclint check * rules/* test/*",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --report-unused-disable-directives .",
"pretests-only": "node ./test/requires",
"tests-only": "babel-tape-runner ./test/test-*.js",
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
"prepublishOnly": "eslint-find-rules --unused && npm test && safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run --silent lint",
"test": "npm run --silent tests-only",
"pretravis": ":",
Expand Down Expand Up @@ -53,28 +68,25 @@
},
"homepage": "https://github.com/airbnb/javascript",
"devDependencies": {
"@babel/runtime": "^7.15.4",
"@babel/runtime": "^7.25.6",
"babel-preset-airbnb": "^4.5.0",
"babel-tape-runner": "^3.0.0",
"eclint": "^2.8.1",
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
"eslint-find-rules": "^3.6.1",
"eslint-plugin-import": "^2.24.2",
"eslint": "^7.32.0 || ^8.2.0",
"eslint-find-rules": "^4.1.0",
"eslint-plugin-import": "^2.30.0",
"in-publish": "^2.0.1",
"safe-publish-latest": "^1.1.4",
"tape": "^5.3.1"
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"peerDependencies": {
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
"eslint-plugin-import": "^2.24.2"
"eslint": "^7.32.0 || ^8.2.0",
"eslint-plugin-import": "^2.30.0"
},
"engines": {
"node": ">= 6"
"node": "^10.12.0 || >=12.0.0"
},
"dependencies": {
"confusing-browser-globals": "^1.0.10",
"object.assign": "^4.1.2",
"object.entries": "^1.1.4",
"semver": "^6.3.0"
"confusing-browser-globals": "^1.0.11"
}
}
36 changes: 24 additions & 12 deletions packages/eslint-config-airbnb-base/rules/best-practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ module.exports = {

// Enforce default clauses in switch statements to be last
// https://eslint.org/docs/rules/default-case-last
// TODO: enable, semver-minor, when eslint v7 is required (which is a major)
'default-case-last': 'off',
'default-case-last': 'error',

// https://eslint.org/docs/rules/default-param-last
// TODO: enable, semver-minor, when eslint v6.4 is required (which is a major)
'default-param-last': 'off',
'default-param-last': 'error',

// encourages use of dot notation whenever possible
// https://eslint.org/docs/rules/dot-notation
Expand All @@ -57,8 +55,7 @@ module.exports = {

// Require grouped accessor pairs in object literals and classes
// https://eslint.org/docs/rules/grouped-accessor-pairs
// TODO: enable in next major, altho the guide forbids getters/setters anyways
'grouped-accessor-pairs': 'off',
'grouped-accessor-pairs': 'error',

// make sure for-in loops have an if statement
// https://eslint.org/docs/rules/guard-for-in
Expand All @@ -70,6 +67,7 @@ module.exports = {

// disallow the use of alert, confirm, and prompt
// https://eslint.org/docs/rules/no-alert
// TODO: enable, semver-major
'no-alert': 'warn',

// disallow use of arguments.caller or arguments.callee
Expand All @@ -82,8 +80,7 @@ module.exports = {

// Disallow returning value in constructor
// https://eslint.org/docs/rules/no-constructor-return
// TODO: enable, semver-major
'no-constructor-return': 'off',
'no-constructor-return': 'error',

// disallow division operators explicitly at beginning of regular expression
// https://eslint.org/docs/rules/no-div-regex
Expand All @@ -107,6 +104,11 @@ module.exports = {
// https://eslint.org/docs/rules/no-empty-pattern
'no-empty-pattern': 'error',

// Disallow empty static blocks
// https://eslint.org/docs/latest/rules/no-empty-static-block
// TODO: semver-major, enable
'no-empty-static-block': 'off',

// disallow comparisons to null without a type-checking operator
// https://eslint.org/docs/rules/no-eq-null
'no-eq-null': 'off',
Expand Down Expand Up @@ -213,8 +215,12 @@ module.exports = {

// Disallow \8 and \9 escape sequences in string literals
// https://eslint.org/docs/rules/no-nonoctal-decimal-escape
// todo: semver-major: enable when v7.14 is required
'no-nonoctal-decimal-escape': 'off',
'no-nonoctal-decimal-escape': 'error',

// Disallow calls to the Object constructor without an argument
// https://eslint.org/docs/latest/rules/no-object-constructor
// TODO: enable, semver-major
'no-object-constructor': 'off',

// disallow use of (old style) octal literals
// https://eslint.org/docs/rules/no-octal
Expand Down Expand Up @@ -381,9 +387,15 @@ module.exports = {
// https://eslint.org/docs/rules/prefer-named-capture-group
'prefer-named-capture-group': 'off',

// Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call()
// https://eslint.org/docs/rules/prefer-object-has-own
// TODO: semver-major: enable thus rule, once eslint v8.5.0 is required
'prefer-object-has-own': 'off',

// https://eslint.org/docs/rules/prefer-regex-literals
// TODO; enable, semver-minor, once eslint v6.4 is required (which is a major)
'prefer-regex-literals': 'off',
'prefer-regex-literals': ['error', {
disallowRedundantWrapping: true,
}],

// require use of the second argument for parseInt()
// https://eslint.org/docs/rules/radix
Expand Down
Loading
Loading