-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint-plugin-tinkoff): split eslint-plugin-tinkoff (#45)
* feat(eslint-plugin-tinkoff): add eslint-plugin-tinkoff source code to packages * feat(eslint-plugin-tinkoff): move eslint-plugin-tinkoff from packages, review fixes * feat(eslint-plugin-tinkoff): split eslint-plugin-tinkoff * feat(eslint-plugin-tinkoff): update configurations .prettierrc * feat(eslint-plugin-tinkoff): add readme files and prelint npm scripts * feat(eslint-plugin-tinkoff): run eslint local inside packages Co-authored-by: o.drapeza <o.drapeza@tinkoff.ru>
- Loading branch information
1 parent
2fe98e9
commit 50d14b1
Showing
52 changed files
with
12,509 additions
and
6,264 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scripts-prepend-node-path=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ language: node_js | |
cache: | ||
npm: false | ||
node_js: | ||
- "12" | ||
- "11" | ||
- "10" | ||
- "9" | ||
- "8" | ||
- "node" | ||
|
||
install: | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*/__fixtures__/* | ||
*/__snapshots__/* | ||
|
||
# from .gitignore | ||
node_modules/ | ||
|
||
# IDE | ||
.DS_Store | ||
.vscode | ||
.idea | ||
|
||
# Compiled sources | ||
lib | ||
|
||
.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"root": true, | ||
|
||
"extends": [ | ||
"@tinkoff/eslint-config/lib" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# IDE | ||
.DS_Store | ||
.vscode | ||
.idea | ||
|
||
# Compiled sources | ||
lib | ||
|
||
.tmp | ||
|
||
debug-path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"proseWrap": "never", | ||
"arrowParens": "always", | ||
"tabWidth": 2, | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# eslint-config-tinkoff | ||
|
||
ESlint plugin includes Tinkoff rules for Angular applications. | ||
|
||
## Usage | ||
|
||
Install from npm | ||
|
||
```bash | ||
npm i --save-dev @tinkoff/eslint-config @tinkoff/eslint-config-angular | ||
``` | ||
|
||
Then, need to include necessary configurations sets to `.eslintrc`. Wee need to choose base configuration, and any necessary additional configs. | ||
|
||
```bash | ||
{ | ||
"extends": ["@tinkoff/eslint-config/app", "@tinkoff/eslint-config-angular"] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
cacheDirectory: '<rootDir>/.tmp/jest', | ||
timers: 'fake', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@tinkoff/eslint-config-angular", | ||
"version": "0.1.0", | ||
"description": "Tinkoff ESLint configs for Angular apps", | ||
"license": "Apache-2.0", | ||
"keywords": [ | ||
"eslint", | ||
"eslintconfig", | ||
"eslint-config" | ||
], | ||
"scripts": { | ||
"build": "tsc", | ||
"watch": "tsc -w", | ||
"test": "jest --clearCache && jest", | ||
"test:watch": "npm run test -- --watch", | ||
"lint": "eslint --ext .jsx,.js,.ts,.tsx --ignore-path .eslintignore .", | ||
"lint:fix": "npm run lint -- --fix", | ||
"prelint:ci": "npm run build", | ||
"pretest:ci": "npm run build", | ||
"preversion": "npm run build", | ||
"build:prod": "npm run build", | ||
"build:watch": "npm run watch", | ||
"test:ci": "", | ||
"lint:ci": "npm run lint" | ||
}, | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"author": { | ||
"name": "Tinkoff Team", | ||
"email": "frontend@tinkoff.ru" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/TinkoffCreditSystems/linters.git" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@tinkoff/eslint-config": "^0.1.0" | ||
}, | ||
"peerDependencies": { | ||
"@typescript-eslint/eslint-plugin": ">=3", | ||
"eslint": ">=7", | ||
"eslint-plugin-import": ">=2.20", | ||
"eslint-plugin-sort-class-members": ">=1.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
extends: [], | ||
|
||
plugins: [], | ||
|
||
rules: { | ||
'import/no-webpack-loader-syntax': 'off', | ||
'sort-class-members/sort-class-members': 'off', | ||
'no-param-reassign': 'off', | ||
'@typescript-eslint/no-useless-constructor': 'off', | ||
'@typescript-eslint/no-extraneous-class': 'off', // incorrect working with constructor parameters | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"compilerOptions": { | ||
"declarationDir": "./lib", | ||
"outDir": "./lib", | ||
"moduleResolution": "node", | ||
"target": "es2017", | ||
"module": "commonjs", | ||
"lib": ["es2015", "es2016", "es2017", "es2018", "dom"], | ||
"strict": false, | ||
"sourceMap": true, | ||
"declaration": true, | ||
"allowSyntheticDefaultImports": true, | ||
"experimentalDecorators": true, | ||
"jsx": "react", | ||
"esModuleInterop": true, | ||
"noUnusedLocals": false, | ||
"resolveJsonModule": true, | ||
"noUnusedParameters": false, | ||
"skipLibCheck": true, | ||
"noEmitOnError": true | ||
}, | ||
"include": ["./src"], | ||
"exclude": [ | ||
"**/*.spec.ts", | ||
"**/*.spec.tsx", | ||
"**/*.test.ts", | ||
"**/*.test.tsx", | ||
"**/*.bench.ts", | ||
"**/__tests__/**" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*/__fixtures__/* | ||
*/__snapshots__/* | ||
|
||
# from .gitignore | ||
node_modules/ | ||
|
||
# IDE | ||
.DS_Store | ||
.vscode | ||
.idea | ||
|
||
# Compiled sources | ||
lib | ||
|
||
.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"root": true, | ||
|
||
"extends": [ | ||
"@tinkoff/eslint-config/lib" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# IDE | ||
.DS_Store | ||
.vscode | ||
.idea | ||
|
||
# Compiled sources | ||
lib | ||
|
||
.tmp | ||
|
||
debug-path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"proseWrap": "never", | ||
"arrowParens": "always", | ||
"tabWidth": 2, | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# eslint-config-tinkoff | ||
|
||
ESlint plugin includes Tinkoff rules for React applications. | ||
|
||
## Usage | ||
|
||
Install from npm | ||
|
||
```bash | ||
npm i --save-dev @tinkoff/eslint-config @tinkoff/eslint-config-react | ||
``` | ||
|
||
Then, need to include necessary configurations sets to `.eslintrc`. Wee need to choose base configuration, and any necessary additional configs. | ||
|
||
```bash | ||
{ | ||
"extends": ["@tinkoff/eslint-config/app", "@tinkoff/eslint-config-react"] | ||
} | ||
``` | ||
|
||
## Internal used plugins | ||
|
||
- `eslint-plugin-react` - common react lint rules | ||
- `eslint-plugin-react-hooks` - lint rules for react hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
cacheDirectory: '<rootDir>/.tmp/jest', | ||
timers: 'fake', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"name": "@tinkoff/eslint-config-react", | ||
"version": "0.1.0", | ||
"description": "Tinkoff ESLint configs for React apps", | ||
"license": "Apache-2.0", | ||
"keywords": [ | ||
"eslint", | ||
"eslintconfig", | ||
"eslint-config" | ||
], | ||
"scripts": { | ||
"build": "tsc", | ||
"watch": "tsc -w", | ||
"test": "jest --clearCache && jest", | ||
"test:watch": "npm run test -- --watch", | ||
"lint": "eslint --ext .jsx,.js,.ts,.tsx --ignore-path .eslintignore .", | ||
"lint:fix": "npm run lint -- --fix", | ||
"prelint:ci": "npm run build", | ||
"pretest:ci": "npm run build", | ||
"preversion": "npm run build", | ||
"build:prod": "npm run build", | ||
"build:watch": "npm run watch", | ||
"test:ci": "", | ||
"lint:ci": "npm run lint" | ||
}, | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"author": { | ||
"name": "Tinkoff Team", | ||
"email": "frontend@tinkoff.ru" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/TinkoffCreditSystems/linters.git" | ||
}, | ||
"dependencies": { | ||
"eslint-config-airbnb": "^18.1.0", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-react": "^7.20.0", | ||
"eslint-plugin-react-hooks": "^4.0.1" | ||
}, | ||
"devDependencies": { | ||
"@tinkoff/eslint-config": "^0.1.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": ">=7", | ||
"eslint-config-prettier": ">=6.11", | ||
"eslint-plugin-import": ">=2.20" | ||
} | ||
} |
Oops, something went wrong.