Skip to content

Commit

Permalink
Merge pull request #84 from alfa-laboratory/fix/prettier-eslint-readme
Browse files Browse the repository at this point in the history
- фикс команды format
- выпиливание json из проверок
  • Loading branch information
voronin-ivan authored Aug 26, 2020
2 parents e3d174d + ac10146 commit e9770c5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ npm info "arui-presets-lint@latest" peerDependencies
"lint:css": "stylelint ./src/**/*.css",
"lint:scripts": "eslint \"**/*.{js,jsx,ts,tsx}\" --ext .js,.jsx,.ts,.tsx",
"lint": "yarn lint:css && yarn lint:scripts",
"format": "prettier-eslint --write \"./{config,src}/**/*.{ts,tsx,js,jsx,json,css}\""
"format": "prettier-eslint --write $INIT_CWD/{config,src}/**/*.{ts,tsx,js,jsx,css}"
}
}
```
Expand All @@ -85,7 +85,7 @@ coverage
```json
{
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": ["prettier-eslint --write", "git add", "eslint"],
"{src,config}/**/*.{js,jsx,ts,tsx}": ["prettier-eslint --write", "git add", "eslint"],
"*.css": ["prettier-eslint --write", "git add", "stylelint"]
},
"husky": {
Expand All @@ -105,10 +105,10 @@ coverage
"lint:css": "stylelint ./src/**/*.css",
"lint:scripts": "eslint \"**/*.{js,jsx,ts,tsx}\" --ext .js,.jsx,.ts,.tsx",
"lint": "yarn lint:css && yarn lint:scripts",
"format": "prettier-eslint --write \"./{config,src}/**/*.{ts,tsx,js,jsx,json,css}\""
"format": "prettier-eslint --write $INIT_CWD/{config,src}/**/*.{ts,tsx,js,jsx,css}"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": ["prettier-eslint --write", "git add", "eslint"],
"{src,config}/**/*.{js,jsx,ts,tsx}": ["prettier-eslint --write", "git add", "eslint"],
"*.css": ["prettier-eslint --write", "git add", "stylelint"]
},
"husky": {
Expand Down
20 changes: 11 additions & 9 deletions eslint/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
],
extends: ['airbnb-typescript', 'airbnb/hooks', 'plugin:@typescript-eslint/recommended'],
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2018,
Expand Down Expand Up @@ -88,7 +84,10 @@ module.exports = {

// A11Y
'jsx-a11y/anchor-is-valid': ['warn', { aspects: ['invalidHref'] }],
'jsx-a11y/label-has-associated-control': ['error', { labelComponents: ['label'], assert: 'either' }],
'jsx-a11y/label-has-associated-control': [
'error',
{ labelComponents: ['label'], assert: 'either' },
],

// typescript
'@typescript-eslint/indent': ['warn', 4, { SwitchCase: 1 }],
Expand Down Expand Up @@ -118,9 +117,12 @@ module.exports = {
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'import/no-useless-path-segments': ['error', {
noUselessIndex: true,
}],
'import/no-useless-path-segments': [
'error',
{
noUselessIndex: true,
},
],
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"test": "yarn test:eslint && yarn test:stylelint",
"test:eslint": "eslint \"./test/**/*.{ts,tsx,js,jsx}\"",
"test:stylelint": "node ./test/stylelint-test.js",
"format": "prettier-eslint --write \"./{eslint,stylelint,test,commitlint}/**/*.{ts,tsx,js,jsx,css}\""
"format": "prettier-eslint --write $INIT_CWD/{eslint,stylelint,test,commitlint}/**/*.{ts,tsx,js,jsx,css}"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx,css}": [
Expand Down

0 comments on commit e9770c5

Please sign in to comment.