tools icon indicating copy to clipboard operation
tools copied to clipboard

☂️ Lint rules from other sources

Open ematipico opened this issue 2 years ago • 5 comments

Description

The team has selected the following additional rules to implement for the 10.0.0 release.

They have been selected from https://github.com/rome/tools/discussions/3357

If the team is able to implement all of them before the release of 10.0.0, other rules will be added.

Note: if the external rule does have options, ignore them for the time being and focus on the default implementation.

  • From eslint
    • [x] #3360
    • [ ] #3481
    • [x] #3361
    • [x] #3363
    • [x] #3362
    • [x] #3364
  • From typescript/eslint
    • [x] #3365
    • [x] #3366
  • From clippy
    • [x] #3367
    • [ ] #3368
  • From eslint-plugin-react-hooks
    • [x] #3478

ematipico avatar Oct 07 '22 10:10 ematipico

Would you mind assigning me the task prefer-numeric-literals?

IWANABETHATGUY avatar Oct 07 '22 11:10 IWANABETHATGUY

Would you mind assigning me the task prefer-numeric-literals?

Sure! Please leave a comment in the issue so I can assign it to you

ematipico avatar Oct 07 '22 12:10 ematipico

More details about

https://github.com/rome/tools/pull/3355 Checks the dependencies array of React Hooks contains all referenced bindings Example error: function Component({ prop }) { useEffect(() => { prop(); }, []); }

  • [x] Missing dependencies;
  • [x] Extra dependencies;
  • [x] Consider some React hooks returns as stable;
  • [x] Consider const a = ; see https://github.com/rome/tools/pull/3508
  • [ ] Consider declarations inside the React component that are potentially capturing non-stable variables.
  • [ ] Incorporate eslint tests
  • [ ] improved configuration https://github.com/rome/tools/pull/3542
  • [x] Correctly suggest dependencies for properties: "a.b" and "a.c" instead of "a" https://github.com/rome/tools/pull/3581
  • [ ] Correctly deal with globals and undefined dependencies

xunilrj avatar Oct 25 '22 18:10 xunilrj

i didn't find any issue that would fit this comment better: are you planning to support custom linting rules? we have a lot of very project-specific linting rules we wrote on our own (we have our internal linting rule package), and for eslint there's lots of third party linting packages out there (e.g. https://github.com/getify/eslint-plugin-proper-arrows/)

DerGernTod avatar Nov 14 '22 09:11 DerGernTod

i didn't find any issue that would fit this comment better: are you planning to support custom linting rules? we have a lot of very project-specific linting rules we wrote on our own (we have our internal linting rule package), and for eslint there's lots of third party linting packages out there (e.g. getify/eslint-plugin-proper-arrows)

It's something that we want to support, but on the other hand it's not something that is easily implementable; we are investigating how to to use V8 as runtime, then we will need to investigate how to add new rules, dynamically. Nowadays it's not even possible using the Rust API because the infrastructure doesn't allow it.

ematipico avatar Nov 14 '22 13:11 ematipico

Closing in favour of #3739

ematipico avatar Nov 15 '22 11:11 ematipico