Skip to content

Commit

Permalink
refactor: extract eslint-config-airbnb rules
Browse files Browse the repository at this point in the history
  • Loading branch information
frantic1048 committed Jul 8, 2024
1 parent 1ecd6fe commit 0c68565
Show file tree
Hide file tree
Showing 21 changed files with 2,352 additions and 148 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"comment": "refactor: extract eslint-config-airbnb rules",
"type": "patch",
"packageName": "@rightcapital/eslint-config-base",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"comment": "refactor: extract eslint-config-airbnb rules",
"type": "patch",
"packageName": "@rightcapital/eslint-config-typescript-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"comment": "refactor: extract eslint-config-airbnb rules",
"type": "patch",
"packageName": "@rightcapital/eslint-plugin",
"email": "[email protected]",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"change": "beachball change --no-commit",
"check": "beachball check",
"commit": "cz",
"dev": "tsc --build --watch",
"fix": "concurrently 'pnpm:fix:*' \"pnpm --filter './specs/*' fix\"",
"fix:eslint": "eslint --fix .",
"fix:prettier": "prettier --write --list-different .",
Expand Down
9 changes: 6 additions & 3 deletions packages/eslint-config-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@
},
"dependencies": {
"@rushstack/eslint-patch": "1.10.3",
"eslint-config-airbnb-base": "15.0.0",
"confusing-browser-globals": "1.0.11",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "npm:[email protected]",
"eslint-plugin-simple-import-sort": "12.1.0",
"eslint-plugin-unicorn": "54.0.0"
"eslint-plugin-unicorn": "54.0.0",
"semver": "7.6.2"
},
"devDependencies": {
"@rightcapital/tsconfig": "workspace:*"
"@rightcapital/tsconfig": "workspace:*",
"@types/confusing-browser-globals": "1.0.3",
"@types/semver": "7.5.8"
},
"peerDependencies": {
"eslint": "^8.23.1"
Expand Down
10 changes: 9 additions & 1 deletion packages/eslint-config-base/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ require('@rushstack/eslint-patch/modern-module-resolution');

const config: Linter.Config = {
extends: [
require.resolve('eslint-config-airbnb-base'),
require.resolve('./rules/best-practices'),
require.resolve('./rules/errors'),
require.resolve('./rules/node'),
require.resolve('./rules/style'),
require.resolve('./rules/variables'),
require.resolve('./rules/es6'),
require.resolve('./rules/imports'),
require.resolve('./rules/strict'),
require.resolve('eslint-config-prettier'),
],
plugins: ['simple-import-sort', 'unicorn'],
env: { es6: true },
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
Expand Down
Loading

0 comments on commit 0c68565

Please sign in to comment.