Giter VIP home page Giter VIP logo

eslint-config's Introduction

第一步:全局安装 eslint,babel-eslint,eslint-plugin-html,eslint-plugin-react,eslint-plugin-vue

npm i eslint babel-eslint eslint-plugin-html eslint-plugin-react eslint-plugin-vue -g

第二步:在任意目录放置.eslintrc.js

第三步:在 vscode 下载 ESLint,Prettier - Code formatter,stylus,language-stylus,Vetur

第四步:在 vscode 中的配置

	// eslint config start
	"eslint.autoFixOnSave": true,
	"eslint.options": {
		"configFile": "C:/Users/Mark/.eslint/.eslintrc.js"
	},
	"eslint.validate": [
		"javascript",
		"javascriptreact",
		"html",
		"vue",
		{
			"language": "vue",
			"autoFix": true
		}
	],
	"vetur.format.options.tabSize": 2,
	"vetur.format.options.useTabs": true,
	"vetur.format.defaultFormatterOptions": {
		"prettier": {
			// Prettier option here
			"semi": false,
			"tabWidth": 2,
			"useTabs": true,
			"singleQuote": true
		},
		"prettyhtml": {
			"printWidth": 100, // No line exceeds 100 characters
			"singleQuote": false // Prefer double quotes over single quotes
		}
	},
	// prettier 格式化配置
	"prettier.tabWidth": 2,
	"prettier.useTabs": true,
	"prettier.singleQuote": true,
	"prettier.semi": false,
	"stylusSupremacy.insertColons": false, // 是否插入冒号
	"stylusSupremacy.insertSemicolons": false, // 是否插入分好
	"stylusSupremacy.insertBraces": false, // 是否插入大括号
	"stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
	"stylusSupremacy.insertNewLineAroundBlocks": false,

eslint-config's People

Contributors

js-mark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.