In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "the configuration and use of eslint in atom". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the configuration and use of eslint in atom".
Download the aotm plug-in linter-eslint
Https://github.com/AtomLinter/linter-eslint
The settings need to be set as follows:
Install locally to your project eslint and the plugin
$npm I-- save-dev eslint [eslint-plugins]
Install globally eslint and plugins
Activate Use Global Eslint package option
(Optional) Set Global Node Path with $npm config get prefix
$npm I-g eslint [eslint-plugins]
Some plug-ins are provided, which can be downloaded by yourself (ps: version differences can cause some plug-ins to report errors)
Eslint-config-airbnb
Eslint-plugin-import
Eslint-plugin-jsx-a11y
Eslint-plugin-react
Eslint-plugin-html (parsable scripts in html, the latest version v4 conflicts with earlier eslint)
And then under the project
$eslint-init
Use the following comments to turn off the prompt. / * eslint-disable * / use eslintignore to ignore specific files and directories
Create a .eslintignore file, add folders to filter, or files
Build/* app/lib/*
The command line uses-- ignore-path:
$eslint-ignore-path .eslintignore-fix app/*
The path is relative to the location of .eslintignore or the current working directory
See more http://eslint.cn/docs/user-guide/configuring
Basic configuration: module.exports = {parser: 'babel-eslint', "env": {"browser": true, "commonjs": true, "es6": true}, / / take the current directory as the root directory No longer look up .eslintrc.js root: true, / / prohibit the use of spaces and tab mixed indentation "extends": "eslint:recommended", globals: {/ / fill in the global variables / / jQuery: false, $: false, wx: false,} required for your project. / / eslint-plugin-html opens "plugins": ["html"], "parserOptions": {"ecmaFeatures": {"jsx": false}, "sourceType": "module"}, "rules": {"indent": ["error", 'tab'], "linebreak-style": ["error", "unix"] "quotes": ["error", "single"], "semi": ["error", "always"], "semi": ["error", "always"], "arrow-spacing": ["error", {"before": true, "after": true}], "no-unused-vars": "off", / / prohibit prompting unused variables Or the function "block-spacing": "error", "no-console": "off", / / you can use console "keyword-spacing": ["error", {"before": true}] / / enforce the consistency of spaces around keywords}} At this point, I believe you have a deeper understanding of "the configuration and use of eslint in atom". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.