eslint

create-react-app subfolder projects do not lint

徘徊边缘 提交于 2020-04-13 06:49:13
问题 Projects bootstrapped with create-react-app within subfolders do not lint. However, if I open the project subfolder as root in VSCode (pictured below), or setup a new create-react-app project at root, linting works fine. This occurs with both standard and ejected create-react-app projects. Ideally without ejecting, how can I make create-react-app's linting work with subfolder projects? I'm using create-react-app v3.1.1, VSCode August 2019 and Windows 10. 回答1: The VSCode ESLint Extension

ElementUI快速入门

ぐ巨炮叔叔 提交于 2020-04-12 08:34:05
https://blog.csdn.net/itcats_cn/article/details/85644226 本文主要从几个方面快速入门ElementUI 1、什么是ElementUI ? 掌握elementUI脚手架搭建 2、掌握elementUI的table组件的使用,实现列表功能 3、掌握elementUI的pagination组件的使用,实现分页功能 4、掌握elementUI的form相关组件的使用,实现条件查询功能 5、掌握elementUI的dialog组件和$message的使用,实现弹出窗口和消息提示功能 6、掌握elementUI的select组件的使用,实现下拉列表功能实现新增数据和修改数据的功能 7、掌握confirm的使用,实现询问框,实现删除功能 1、什么是ElementUI? Element 饿了么前端出品的一套 基于 Vue 2.0 的桌面端组件库 官网: http://element.eleme.io/#/zh-CN 1.1、搭建elementUI脚手架(vue-admin-template) # Clone project git clone https://github.com/PanJiaChen/vue-admin-template.git # Install dependencies npm install # Serve with

vue-cli3.0之vue.config.js的配置项(注解)

天大地大妈咪最大 提交于 2020-04-11 20:01:43
module.exports = { // 部署应用时的基本 URL baseUrl: process.env.NODE_ENV === 'production' ? '192.168.60.110:8080' : '192.168.60.110:8080', // build时构建文件的目录 构建时传入 --no-clean 可关闭该行为 outputDir: 'dist', // build时放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 assetsDir: '', // 指定生成的 index.html 的输出路径 (相对于 outputDir)。也可以是一个绝对路径。 indexPath: 'index.html', // 默认在生成的静态资源文件名中包含hash以控制缓存 filenameHashing: true, // 构建多页面应用,页面的配置 pages: { index: { // page 的入口 entry: 'src/index/main.js', // 模板来源 template: 'public/index.html', // 在 dist/index.html 的输出 filename: 'index.html', // 当使用 title 选项时,template 中的 title

@typescript-eslint/eslint-plugin error: 'Route' is defined but never used (no-unused-vars)

為{幸葍}努か 提交于 2020-04-10 16:21:12
问题 After eslint adds typescript check, there will be an error when the attribute variable in the class definition is Array. this is my eslintrc.js module.exports = { root: true, env: { node: true }, 'extends': ['plugin:vue/essential', '@vue/standard'], rules: {}, parserOptions: { parser: '@typescript-eslint/parser', project: "./tsconfig.json" }, plugins: ['@typescript-eslint'] }; 回答1: Looking at the eslint repository on github, there have been lots of issues opened about the no-unused-vars rule.

@typescript-eslint/eslint-plugin error: 'Route' is defined but never used (no-unused-vars)

空扰寡人 提交于 2020-04-10 16:20:50
问题 After eslint adds typescript check, there will be an error when the attribute variable in the class definition is Array. this is my eslintrc.js module.exports = { root: true, env: { node: true }, 'extends': ['plugin:vue/essential', '@vue/standard'], rules: {}, parserOptions: { parser: '@typescript-eslint/parser', project: "./tsconfig.json" }, plugins: ['@typescript-eslint'] }; 回答1: Looking at the eslint repository on github, there have been lots of issues opened about the no-unused-vars rule.

@typescript-eslint/eslint-plugin error: 'Route' is defined but never used (no-unused-vars)

痞子三分冷 提交于 2020-04-10 16:18:11
问题 After eslint adds typescript check, there will be an error when the attribute variable in the class definition is Array. this is my eslintrc.js module.exports = { root: true, env: { node: true }, 'extends': ['plugin:vue/essential', '@vue/standard'], rules: {}, parserOptions: { parser: '@typescript-eslint/parser', project: "./tsconfig.json" }, plugins: ['@typescript-eslint'] }; 回答1: Looking at the eslint repository on github, there have been lots of issues opened about the no-unused-vars rule.

how to exclude css files from eslint parser in React

孤人 提交于 2020-04-10 08:35:11
问题 I need to exclude css files from the eslint parser. Currently when I run eslint src/** this is checking all the files including css files. . Please find below my eslintrc file contents. module.exports = { "parser": "babel-eslint", "extends": "airbnb", "plugins": [ "react", "jsx-a11y", "import" ], "env" : { "browser": true } "rules": { "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], }, }; 回答1: .eslintignore file to ignore styles would work nicely. Inside, do something

how to exclude css files from eslint parser in React

跟風遠走 提交于 2020-04-10 08:35:08
问题 I need to exclude css files from the eslint parser. Currently when I run eslint src/** this is checking all the files including css files. . Please find below my eslintrc file contents. module.exports = { "parser": "babel-eslint", "extends": "airbnb", "plugins": [ "react", "jsx-a11y", "import" ], "env" : { "browser": true } "rules": { "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], }, }; 回答1: .eslintignore file to ignore styles would work nicely. Inside, do something

esLint - Configuring “no-unused-vars” for Typescript

馋奶兔 提交于 2020-04-08 19:01:13
问题 I use esLint in all of my Typescript projects with the following settings: "extends": ["airbnb", "prettier", 'plugin:vue/recommended'], "plugins": ["prettier"], "parserOptions": { "parser": "@typescript-eslint/parser", "ecmaVersion": 2018, "sourceType": "module" }, + a bunch of custom rules. I've also installed the following dependencies for Typescript support: "@typescript-eslint/eslint-plugin": "^1.7.0", "@typescript-eslint/parser": "^1.7.0", However, one of esLint's most useful rules,

esLint - Configuring “no-unused-vars” for Typescript

橙三吉。 提交于 2020-04-08 19:00:25
问题 I use esLint in all of my Typescript projects with the following settings: "extends": ["airbnb", "prettier", 'plugin:vue/recommended'], "plugins": ["prettier"], "parserOptions": { "parser": "@typescript-eslint/parser", "ecmaVersion": 2018, "sourceType": "module" }, + a bunch of custom rules. I've also installed the following dependencies for Typescript support: "@typescript-eslint/eslint-plugin": "^1.7.0", "@typescript-eslint/parser": "^1.7.0", However, one of esLint's most useful rules,