Skip to content

Simple example of validation of what is expected of ESLint

Notifications You must be signed in to change notification settings

machadoit/eslint-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

ESLint Validation

Example of a simple project that showcase a kind of issue that ESLint is expected to report.

Configurtion file

It is expected the tool to use the .eslintrc on the root of the project when running:

  "plugins": [
    "react"
  ],
  "rules": {
    "quotes": [2, "double"]
  }

In this case, I depend on the react plugin and the rule for the quoting style of my code should be double quotes i.e strings with single quotes must be warned by ESLint.

Run the tool on Linux

  • Install ESLint

    npm install -g eslint

  • Install necessary plugins, in this case, only needs react

    npm install -g eslint-plugin-react

  • Run the tool on the root of the repository

    eslint .

Expected results

The tool should return an error on line 4 of example.js stating that "Strings must use doublequote"

ExpetectedResult

About

Simple example of validation of what is expected of ESLint

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published