Releases: trendmicro-frontend/eslint-config-trendmicro
v3.1.1
v3.1.0
What's Changed
- feat: add
default-param-last
rule (cf1eb1a) - feat: add
react/function-component-definition
rule (361b056) - feat: add
react/no-unstable-nested-components
rule (361b056) - feat: add
react/no-unused-class-component-methods
rule (9fd06ad) - feat: add
no-constructor-return
rule (3e5c3fa) - feat: add
prefer-regex-literals
rule (c3601c6)
v3.0.0
v2.2.0
v2.1.0
What's Changed
Rules
camelcase
This rule focuses on using the camelcase approach. If your style guide calls for camelCasing your variable names.
'camelcase': [2, {
'allow': ['^UNSAFE_'],
'properties': 'never',
}]
jsx-a11y/control-has-associated-label
Enforce that a control (an interactive element) has a text label.
'jsx-a11y/control-has-associated-label': 1
react/jsx-fragments
In JSX, a React fragment is created either with <React.Fragment>...</React.Fragment>
, or, using the shorthand syntax, <>...</>
. This rule allows you to enforce one way or the other.
'react/jsx-fragments': 1
react/state-in-constructor
This rule will enforce the state initialization style to be either in a constructor or with a class property.
'react/state-in-constructor': 0,
react/static-property-placement
This rule allows you to enforce where childContextTypes
, contextTypes
, contextType
, defaultProps
, displayName
, and propTypes
are declared in an ES6 class.
'react/static-property-placement': 1
react/jsx-props-no-spreading
Enforces that there is no spreading for any JSX attribute.
'react/jsx-props-no-spreading': 0
Full Changelog: v2.0.1...v2.1.0
v2.0.1
v2.0.0
v1.4.1
Rules
import/named
Disable import/named to avoid false positives when using CommonJS and/or modifying the exported namespace of any module at runtime
'import/named': 0
lines-between-class-members
Improves readability by enforcing lines between class members
'lines-between-class-members': 1
operator-linebreak
Consistent linebreak style for operators
'operator-linebreak': [1, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}]
v1.4.0
Dependencies
"dependencies": {
"eslint-config-airbnb": "^17.0.0"
},
"peerDependencies": {
"eslint": "^5.2.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.10.0"
}
Rules
import/no-relative-parent-imports
'import/no-relative-parent-imports': 0
jsx-a11y/label-has-associated-control
'jsx-a11y/label-has-associated-control': 'off'
max-classes-per-file
'max-classes-per-file': [2, 1]
max-lines-per-function
'max-lines-per-function': [1, {
'max': 200,
'skipBlankLines': true,
'skipComments': true
}]
prefer-object-spread
'prefer-object-spread': 0
react/no-unsafe
'react/no-unsafe': 1