1.0.8 • Published 2 years ago
@cylution/eslint-config-react v1.0.8
@cylution/eslint-config-react
yarn add -D eslint @cylution/eslint-config-react
Usage
Edit .eslintrc
or .eslintrc.js
module.exports = {
extends: ['@cylution/react'],
rules: {
'react/jsx-closing-bracket-location': [1, {
nonEmpty: 'tag-aligned',
selfClosing: 'line-aligned',
}]
},
}
Extra step for typescript
npm i -D @typescript-eslint/parser typescript
yarn add -D @typescript-eslint/parser typescript
Modify .eslintrc.js
// .eslintrc.js
module.exports = {
extends: ['@cylution/react'],
overrides: [
// typescript
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
rules: {
'react/jsx-closing-bracket-location': [1, {
nonEmpty: 'tag-aligned',
selfClosing: 'line-aligned',
}]
},
},
],
}
Note
If you get error message like: Could not load/find module eslint-blahblah
, please remove node_modules
and run npm install
or yarn
to reinstall packages
1.0.8
2 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.3-alpha.1
3 years ago
1.0.3-alpha.0
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago