Skip to content

Commit

Permalink
feat: update linters (#24)
Browse files Browse the repository at this point in the history
* feat: update linters
  • Loading branch information
niktverd authored Apr 6, 2023
1 parent eff0a62 commit bc5aa0f
Show file tree
Hide file tree
Showing 85 changed files with 663 additions and 468 deletions.
124 changes: 100 additions & 24 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,102 @@
{
"extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/prettier", "@gravity-ui/eslint-config/client"],
"root": true,
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"valid-jsdoc": "off"
}
},
{
"files": ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
"extends": ["plugin:testing-library/react"]
},
{
"files": ["**/__stories__/**/*.[jt]s?(x)"],
"rules": {
"no-console": "off"
}
}
],
"env": {
"node": true,
"jest": true
}
"extends": [
"@gravity-ui/eslint-config",
"@gravity-ui/eslint-config/prettier",
"@gravity-ui/eslint-config/client"
],
"root": true,
"plugins": ["no-not-accumulator-reassign"],
"rules": {
"no-confusing-arrow": "off",
"no-shadow": "off",
"no-param-reassign": ["warn", {"props": false}],
"no-not-accumulator-reassign/no-not-accumulator-reassign": [
"warn",
["reduce"],
{"props": true}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"valid-jsdoc": "off",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc"
},
"newlines-between": "always",
"groups": [
"builtin",
"external",
"internal",
["sibling", "parent"],
"index",
"type",
"unknown"
],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "{@yandex-**,@gravity-ui,@doc-tools}/**",
"group": "external",
"position": "after"
},
{
"pattern": "{analytics,counters,contexts,components,hoc,hooks,utils,store,units,i18n,models,router,services}{,/**}",
"group": "internal",
"position": "after"
},
{
"pattern": "*.{svg,png,jpg,jpeg,json}",
"patternOptions": {
"dot": true,
"nocomment": true,
"matchBase": true
},
"group": "type",
"position": "after"
},
{
"pattern": "*.{css,scss}",
"patternOptions": {
"dot": true,
"nocomment": true,
"matchBase": true
},
"group": "type",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": [
"*.{css,scss}",
"*.{svg,png,jpg,jpeg,json}",
"react"
],
"warnOnUnassignedImports": true
}
]
}
},
{
"files": ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
"extends": ["plugin:testing-library/react"]
},
{
"files": ["**/__stories__/**/*.[jt]s?(x)"],
"rules": {
"no-console": "off"
}
}
],
"env": {
"node": true,
"jest": true
}
}
7 changes: 4 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/* eslint-env node */
const path = require('path');

const {task, src, dest, series, parallel} = require('gulp');
const rimraf = require('rimraf');
const ts = require('gulp-typescript');
const replace = require('gulp-replace');
const sass = require('gulp-dart-sass');
const rename = require('gulp-rename');
const replace = require('gulp-replace');
const ts = require('gulp-typescript');
const rimraf = require('rimraf');

const BUILD_CLIENT_DIR = path.resolve('build');
const SERVER_CLIENT_DIR = path.resolve('server');
Expand Down
Loading

0 comments on commit bc5aa0f

Please sign in to comment.