Skip to content

Commit

Permalink
общие конфиги и плагины
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Kozlov committed Jan 20, 2021
1 parent 56f34f2 commit 4ab014f
Show file tree
Hide file tree
Showing 6 changed files with 2,467 additions and 21 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
plugins: [
'eslint-plugin-unicorn',
'eslint-plugin-jest',
'eslint-plugin-sonarjs',
'eslint-plugin-jsdoc',
'eslint-plugin-unused-imports',
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'eslint-config-airbnb',
'eslint-config-airbnb/hooks',
'plugin:eslint-comments/recommended',
'plugin:jest/all',
'plugin:sonarjs/recommended',
'plugin:jsdoc/recommended',
'plugin:@typescript-eslint/recommended',
],
env: {
browser: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
},
};
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# файлы создаваемые редакторами
.idea
.vscode
*.sublime-project
*.sublime-workspace
*.orig
*.bak

# файлы системы
.DS_Store
Thumbs.db

# npm
node_modules/

# логи
*.log
38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,27 @@

## Установка и настройка

todo
Самостоятельно установите eslint версии 7 или выше:

## Eslint
`npm i eslint`

todo версия
Установите данный набор правил и конфигов:

## Плагины и готовые конфиги правил
`todo`

todo
## Плагины и готовые конфиги правил

| Плагин/конфиг | Версия | Используется для extends |
| ------ | ------ | ------ |
| []() | todo ||
| []() | todo ||
| []() | todo ||
| []() | todo ||
| []() | todo ||
| []() | todo ||

## Прочие пакеты и настройки

todo

parser: '@typescript-eslint/parser',

env: {
browser: true,
},
| eslint | peer | eslint:recommended |
| [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb) | 18.2.1 | eslint-config-airbnb <br /> eslint-config-airbnb/hooks |
| [eslint-plugin-jest](https://www.npmjs.com/package/eslint-plugin-jest) | 24.1.3 | plugin:jest/all |
| [eslint-plugin-unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn) | 26.0.1 ||
| [eslint-plugin-eslint-comments](https://www.npmjs.com/package/eslint-plugin-eslint-comments) | 3.2.0 | plugin:eslint-comments/recommended |
| [eslint-plugin-sonarjs](https://www.npmjs.com/package/eslint-plugin-sonarjs) | 0.5.0 | plugin:sonarjs/recommended |
| [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc) | 31.0.8 | plugin:jsdoc/recommended |
| [eslint-plugin-unused-imports](https://www.npmjs.com/package/eslint-plugin-unused-imports) | 1.0.1 ||
| [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) | 4.14.0 | plugin:@typescript-eslint/recommended |

Набор рекомендуемых правил `unicorn` отключен по умолчанию по причине чрезмерной жесткости.
При желании можно расширить свой конфиг, добавив в него `plugin:unicorn/recommended`.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const eslintrc = require('./.eslintrc');

module.exports = eslintrc;
Loading

0 comments on commit 4ab014f

Please sign in to comment.