Skip to content

AdamDemirel/adams-eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adams-eslint-config

  • My favourite ESlint rules

Usage

In eslintrc file of project:

  • "extends": "adam-demirel" or "eslint-config-adam-demirel" for standard JS linting rules
  • "extends": "adam-demirel/react" or "eslint-config-adam-demirel/react for react linting rules

Example .eslintrc.js:

module.exports = {
  env: {
    browser: true,
    es2021: true,
  },
  extends: [
    'adam-demirel',
  ],
  parserOptions: {
    ecmaVersion: 12,
    sourceType: 'module',
  },
};

Recommended VScode settings

  1. In CLI: $ code --install-extension dbaeumer.vscode-eslint to install dbaeumer.vscode-eslint extension (make sure it's enabled)

  2. In VScodes settings.json (cmd+p + "Preferences: Open Settings (JSON)"):

"editor.codeActionsOnSave": {
    "source.fixAll.eslint": true,
  },
"[javascript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
 },
  • This formats linting rules on save

NPM helper commands

  • $ npm version <patch|minor|major> (required for new publish)
  • $ npm publish

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published