8000 GitHub - alex-lit/config-eslint
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

alex-lit/config-eslint

Repository files navigation

ESLint Configuration

Installation

npm i @alexlit/config-eslint -D

Connection

// .eslintrc.js
module.exports = {
  extends: ['./node_modules/@alexlit/config-eslint'],
};

Recipes

Vue

  • If you use vue.js with options api syntax you need to turn off sort-keys rule for *.vue files

    // .eslintrc.js
    overrides: [
      {
        files: ['*.vue'],
        rules: {
          'sort-keys': 'off',
        },
      },
    ];

Spell check

  • Skip some words

    // .eslintrc.js
    const SPELLCHECK_RULES = require('@alexlit/config-eslint/plugins/spellcheck')
      .rules['spellcheck/spell-checker'][1];
    
    module.exports = {
      rules: {
        'spellcheck/spell-checker': [
          'warn',
          {
            ...SPELLCHECK_RULES,
    
            skipWords: [...SPELLCHECK_RULES.skipWords, 'word1', 'word2'],
          },
        ],
      },
    };
  • Disable spell checking

    // .eslintrc.js
    module.exports = {
      rules: {
        'spellcheck/spell-checker': 'off',
      },
    };

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0