# eslint-config-maka

> makajs ESLint 规则

Latest version **1.0.1** (published 2020-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-maka
pnpm add eslint-config-maka
yarn add eslint-config-maka
bun add eslint-config-maka
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-03-12 |
| First published | 2020-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 7 |
| Unpacked size | 78 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ziaochina |

## Links

- npm: https://www.npmjs.com/package/eslint-config-maka
- npm.io page: https://npm.io/package/eslint-config-maka

## Dependencies (7)

- [babel-eslint](https://npm.io/package/babel-eslint.md) ^8.2.6
- [eslint-plugin-jsdoc](https://npm.io/package/eslint-plugin-jsdoc.md) ^4.1.1
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.11.1
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.14.0
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.1.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^2.0.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^2.0.0

## Recent versions

- 1.0.1 (latest) — 2020-03-12
- 1.0.0 — 2020-03-12

## README

# eslint-config-maka

makajs ESLint 规则

## 安装

```bash
npm i eslint-config-maka --save-dev
```

## 用法

- `package.json`

```json
{
  "devDependencies": {
    "eslint-config-maka": "1",
    "eslint": "4"
  }
}
```

- `.eslintrc.js`

```js
module.exports = {
  extends: 'eslint-config-maka',
};
```

### typescript项目用法

- `package.json`

```json
{
  "devDependencies": {
    "eslint-config-maka": "1",
    "typescript": "^3.5.3"
  }
}
```

- `.eslintrc.js`

```js
module.exports = {
  extends: 'eslint-config-maka/typescript',
  parserOptions: {
    // 推荐使用另外名称例如 tsconfig.eslint.json，继承 tsconfig.json.
    // @see https://github.com/typescript-eslint/typescript-eslint/issues/890
    project: './tsconfig.json'
  }
};
```

- `scripts`

```json
{
  "lint": "eslint . --ext .ts"
}
```

- `settings.json` in vscode

```json
{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "typescript",
      "autoFix": true
    },
  ]
}
```

### 使用最新的ES特性

如果要使用最新的ES特性，使用babel-eslint语法解析器：

- `package.json`

```json
{
  "devDependencies": {
    "eslint-config-maka": "1",
    "eslint": "4",
    "babel-eslint": "8"
  }
}
```

- `.eslintrc.js`

```js
module.exports = {
  extends: 'eslint-config-maka',
  parser: 'babel-eslint',
  rules: {
    // see https://github.com/eslint/eslint/issues/6274
    'generator-star-spacing': 'off',
    'babel/generator-star-spacing': 'off',
  }
};
```

### 前端React用法

eslint-config-maka + react + jsx + es6 一起使用 :

- `package.json`

```json
{
  "devDependencies": {
    "eslint-config-maka": "1",
    "eslint": "4",
    "babel-eslint": "8",
    "eslint-plugin-react": "7"
  }
}
```

- `.eslintrc.js`

```js
module.exports = {
  extends: '@makajs/eslint-config',
  parser: 'babel-eslint',
  parserOptions: {
    sourceType: 'module',
  },
  plugins: [
    'react',
  ],
  rules: {
    // for variables in jsx
    'react/jsx-uses-vars': 'error',
    // see https://github.com/eslint/eslint/issues/6274
    'generator-star-spacing': 'off',
    'babel/generator-star-spacing': 'off',
  },
};
```

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/eslint-config-maka · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
