/eslint-config-attack

The attack eslint config is a shareable config for JavaScript/Vue project.

Primary LanguageJavaScriptMIT LicenseMIT

English/简体中文

Project Description

The attack eslint config is a shareable config for JavaScript/Vue project.

Dependency

Node, ESLint, babel-eslint, vue-eslint-parser, eslint-plugin-vue.

Install

#npm
npm install eslint-config-attack --save-dev
#yarn
yarn add eslint-config-attack --dev

Quick Start

Base Rules Usage

#npm
npm install eslint babel-eslint eslint-config-attack --save-dev
#yarn
yarn add eslint babel-eslint eslint-config-attack --dev

​ create an .eslintrc.js in the root dictionary of your project,then copy the following content into it:

module.exports = {
  extends: [
    'attack',
  ],
  env: {
    // browser: true,
    // node: true,
    // mocha: true,
    // jest: true,
    // jquery: true
  },
  globals: {
  },
  rules: {
  }
};

Vue Rules Usage

#npm
npm install --save-dev eslint babel-eslint vue-eslint-parser eslint-plugin-vue eslint-config-attack
#yarn
yarn add eslint babel-eslint vue-eslint-parser eslint-plugin-vue eslint-config-attack --dev

​ create an .eslintrc.js in the root dictionary of your project,then copy the following content into it:

module.exports = {
  extends: [
    'attack',
    'attack/vue',
  ],
  env: {
    // browser: true,
    // node: true,
    // mocha: true,
    // jest: true,
    // jquery: true
  },
  globals: {
  },
  rules: {
  }
};

React Rules Usage

#npm
npm install --save-dev eslint babel-eslint  eslint-plugin-react eslint-config-attack
#yarn
yarn add eslint babel-eslint  eslint-plugin-react eslint-config-attack --dev

​ create an .eslintrc.js in the root dictionary of your project,then copy the following content into it:

module.exports = {
  extends: [
    'attack',
    'attack/react',
  ],
  env: {
    // browser: true,
    // node: true,
    // mocha: true,
    // jest: true,
    // jquery: true
  },
  globals: {
  },
  rules: {
  }
};

Issues

issues

License

MIT