standardjs

Definition for rule 'react-hooks/exhaustive-deps' was not found

心已入冬 提交于 2021-02-07 04:53:06
问题 I am getting the following eslint error after adding // eslint-disable-next-line react-hooks/exhaustive-deps in my code. 8:14 error Definition for rule 'react-hooks/exhaustive-deps' was not found I referred to this post to fix this but the solution mentioned doesn't work in my case. Any clue how to suppress this eslint error? PS I'm using standardjs in conjuction. 回答1: This typically happens because the react-hooks plugin is missing in the .eslintrc plugin configuration. Ensure you have added

Is it possible to show warnings instead of errors on ALL of eslint rules?

老子叫甜甜 提交于 2021-01-21 12:11:41
问题 As the title says, would it be possible for eslint to show warnings instead of errors on ALL of the rules? I'm using Standard JS, if that information is relevant. Thanks! 回答1: I think there's no out-of-the-box option right now, but maybe you could use a plugin to archieve that: Eslint plugin only warn Or set all the rules ar warning instead of errors. 回答2: Following es-lint-plugin-prettier readme, edit your .eslintrc.json and put a specific rule for prettier : "rules": { // maybe your other

Is it possible to show warnings instead of errors on ALL of eslint rules?

别说谁变了你拦得住时间么 提交于 2021-01-21 12:07:53
问题 As the title says, would it be possible for eslint to show warnings instead of errors on ALL of the rules? I'm using Standard JS, if that information is relevant. Thanks! 回答1: I think there's no out-of-the-box option right now, but maybe you could use a plugin to archieve that: Eslint plugin only warn Or set all the rules ar warning instead of errors. 回答2: Following es-lint-plugin-prettier readme, edit your .eslintrc.json and put a specific rule for prettier : "rules": { // maybe your other

Is it possible to show warnings instead of errors on ALL of eslint rules?

亡梦爱人 提交于 2021-01-21 12:06:41
问题 As the title says, would it be possible for eslint to show warnings instead of errors on ALL of the rules? I'm using Standard JS, if that information is relevant. Thanks! 回答1: I think there's no out-of-the-box option right now, but maybe you could use a plugin to archieve that: Eslint plugin only warn Or set all the rules ar warning instead of errors. 回答2: Following es-lint-plugin-prettier readme, edit your .eslintrc.json and put a specific rule for prettier : "rules": { // maybe your other

Standardjs no-unused-vars while it's used

半腔热情 提交于 2020-02-03 13:13:44
问题 In my Typescript React project, I defined: export type NavState = { mounted: boolean } and then in my component I used theme like: import { NavState } from '../../models/nav' class Nav extends React.Component<any, NavState> { state: NavState = { mounted: false } } but I got red underline for NavState in my import and it says: 'NavState' is defined but never used. (no-unused-vars)standard(no-unused-vars) In my package.json I have this: "standard": { "ignore": [ "node_modules/**", "**/_

Standardjs no-unused-vars while it's used

佐手、 提交于 2020-02-03 13:06:33
问题 In my Typescript React project, I defined: export type NavState = { mounted: boolean } and then in my component I used theme like: import { NavState } from '../../models/nav' class Nav extends React.Component<any, NavState> { state: NavState = { mounted: false } } but I got red underline for NavState in my import and it says: 'NavState' is defined but never used. (no-unused-vars)standard(no-unused-vars) In my package.json I have this: "standard": { "ignore": [ "node_modules/**", "**/_