eslintrc

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

eslint Parsing error: Unexpected token function with async

亡梦爱人 提交于 2021-01-20 16:22:46
问题 I am getting the following error in async usage on ESLINT. eslint Parsing error: Unexpected token function with async Here is my eslintsrc { "extends": "airbnb-base", "rules": { "no-console": "off", "func-style":"error", "import/no-extraneous-dependencies": ["error", {"devDependencies": false, "optionalDependencies": false, "peerDependencies": false, "packageDir": "./"}] }, "parserOptions": { "ecmaVersion":8 } } UPDATE Here is my async const get = async function get(req, res) { const user =

How can I disable the error (prettier/prettier) on eslint?

佐手、 提交于 2020-12-30 05:33:12
问题 While coding, I was not using eslint. Now I installed it and it has flooded my editor with prettier/prettier errors, which by no way seem like they make my code prettier. I am looking to find a way to solve this. prettierrc.js: module.exports = { bracketSpacing: true, jsxBracketSameLine: false, singleQuote: true, trailingComma: 'all', }; eslintrc.js: module.exports = { root: true, extends: '@react-native-community', }; And finally, some example code: import React, {Component} from 'react';

Allow debugger; statements in certain files, using ESLint

可紊 提交于 2020-12-29 03:56:14
问题 Say I want to use this rule: https://eslint.org/docs/rules/no-debugger however, I have about 15 files where I want to keep debugger; statements. Is there something I can add at the top of the .ts/.js files, that can tell ESLint to ignore the no-debugger rule for this particular file? 回答1: You can do that like this: /* eslint-disable no-debugger */ ... code that violates rule ... /* eslint-enable no-debugger */ 回答2: You can also disable ESLint in the same line: debugger; // eslint-disable-line