Skip to content

Development-Hobbies/eslint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESLint

Setup

Initialize package

	// npm
	npm init -y
	// yarn
	yarn init -y

Install eslint

	// npm
	npm install eslint --save-dev
	// yarn
	yarn add eslint --dev

Initialize basic config for eslint

	// npm
	npx eslint --init
	//yarn
	yarn run eslint --init

Available Rules

More Rules

Configure .eslintrc.{js,yml,json}

{
	"rules": {
		"semi": ["error", "always"],
		"qoutes": ["error", "double"]
	}
}

"off" === 0

"warn" === 1

"error" === 2

More configuration examples

{
	"extends": "eslint:recommended"
}

Rules with check on this page will be extended to your config.

You can use configurations created by the others by extending them. Can be find here

Running ESLint

	// npm
	npx eslint yourfile.js
	// yarn
	yarn run eslint yourfile.js

More Detail Info: ESLint

Releases

No releases published

Packages

No packages published