Skip to content
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

Outdated rules #13

Open
akira02 opened this issue Apr 22, 2022 · 0 comments
Open

Outdated rules #13

akira02 opened this issue Apr 22, 2022 · 0 comments
Assignees

Comments

@akira02
Copy link

akira02 commented Apr 22, 2022

Readme

Should be "extends": "@portto/eslint-config-portto/browser".
Also need following package installed. Is it necessary?

yarn add --dev eslint-plugin-compat eslint-plugin-flowtype

rules/base.js

  • semi: ['error', 'always']
    Do we need semi every line?
  • 'no-nested-ternary': 'error'
    With prettier, nesting ternary expressions is acceptable now. And it will be more complicated in jsx if prohibited.

For example:

{status === ItemStatus.BUYING ? (
    <Spinner />
) : locked ? 
    'OUT OF STOCK'
  : 
    'BUY'
}

rules/react.js

  • 'react/react-in-jsx-scope': 'error'
    After React v17 this is no longer needed.
  • 'react/jsx-filename-extension': ['error', { extensions: ['.js'] }],
    We alse use TypeScripts now.

rules/import.js

  • import/extensions missing .ts and .tsx

Other

Overall, TypeScript and ES6 is not support well. Maybe define a new eslint rule well be better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants