Skip to content

RobinCsl/how-to-test-your-eslint-config

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

How to test your ESLint config

This project is supporting the How to test your ESLint config article on my blog.

Remix on Glitch

Remixing on Glitch will allow you to have access to a terminal to run npm run lint or npm run test:eslintConfig. You could experiment with commenting/uncommenting certain parts of this repo and see how it affects these 2 npm scripts.

To access the terminal on Glitch, you can go into Tools (bottom left corner) > Terminal, or press CTRL + SHIFT + X.

For example, you could try:

  • to remove the configuration which restricts date-fns/locale from being imported;
  • to add an // eslint-disable-next-line in index.js to suppress the linting error;
  • to copy index.js into a nested folder and add your own .eslintrc.js file which would override the no-restricted-import rule (this should keep npm run test:eslintConfig passing...);
  • to harden this setup with the suggestions from my How to test your ESLint config article.

License

See LICENSE

About

An example of how to test your ESLint config

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published