mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 12:18:00 -05:00
Compare commits
6 Commits
eslint-con
...
actions
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34b5bc39f1 | ||
|
|
d4e39c9b10 | ||
|
|
baaa5e8d26 | ||
|
|
274c8d5701 | ||
|
|
38bc026fe4 | ||
|
|
445322db64 |
@@ -376,6 +376,11 @@ 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
|
||||
'prefer-regex-literals': ['error', {
|
||||
disallowRedundantWrapping: true,
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
19.0.4 / 2021-12-25
|
||||
==================
|
||||
- republish to fix #2529
|
||||
|
||||
19.0.3 / 2021-12-24
|
||||
==================
|
||||
- [patch] set `namedComponents` option to match style guide
|
||||
- [deps] update `eslint-plugin-react`
|
||||
|
||||
19.0.2 / 2021-12-02
|
||||
==================
|
||||
- [meta] fix "exports" path (#2525)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint-config-airbnb",
|
||||
"version": "19.0.2",
|
||||
"version": "19.0.4",
|
||||
"description": "Airbnb's ESLint config, following our styleguide",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
@@ -79,7 +79,7 @@
|
||||
"eslint-find-rules": "^4.0.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.27.1",
|
||||
"eslint-plugin-react": "^7.28.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"react": ">= 0.13.0",
|
||||
@@ -90,7 +90,7 @@
|
||||
"eslint": "^7.32.0 || ^8.2.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.27.1",
|
||||
"eslint-plugin-react": "^7.28.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
3
packages/eslint-config-airbnb/rules/react.js
vendored
3
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -524,9 +524,8 @@ module.exports = {
|
||||
|
||||
// Enforce a specific function type for function components
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
|
||||
// TODO: investigate if setting namedComponents to expression vs declaration is problematic
|
||||
'react/function-component-definition': ['error', {
|
||||
namedComponents: 'function-expression',
|
||||
namedComponents: ['function-declaration', 'function-expression'],
|
||||
unnamedComponents: 'function-expression',
|
||||
}],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user