Skip to content

Commit

Permalink
feat: split eslint config up into smaller constructs
Browse files Browse the repository at this point in the history
  • Loading branch information
justinm committed Apr 21, 2022
1 parent fc445c7 commit ba3e7b9
Show file tree
Hide file tree
Showing 16 changed files with 1,452 additions and 805 deletions.
9 changes: 6 additions & 3 deletions .pdkitrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ const workspace = new YarnMonoWorkspace("pdkit", {
},
eslint: {
enabled: true,
prettier: true,
prettier: {},
lineWidth: 140,
doubleQuotes: true,
},
jest: {
enabled: true,
Expand Down Expand Up @@ -98,8 +99,9 @@ new YarnProject(workspace, "core", {
},
eslint: {
enabled: true,
prettier: true,
prettier: {},
lineWidth: 140,
doubleQuotes: true,
},
jest: {
enabled: true,
Expand Down Expand Up @@ -151,8 +153,9 @@ new YarnProject(workspace, "cli", {
},
eslint: {
enabled: true,
prettier: true,
prettier: {},
lineWidth: 140,
doubleQuotes: true,
},
jest: {
enabled: true,
Expand Down
173 changes: 145 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"compile": "yarn workspaces foreach --verbose -p --topological-dev --no-private run compile",
"clean": "yarn workspaces foreach --verbose -p --topological-dev --no-private run clean",
"yalc": "yarn workspaces foreach --verbose -p --topological-dev --no-private run yalc",
"lint": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src",
"lint": "eslint --ext ts src",
"test": "jest --passWithNoTests --all",
"release": "npx multi-semantic-release"
},
Expand All @@ -38,23 +38,24 @@
"@semantic-release/commit-analyzer": "9.0.2",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "8.0.2",
"@semantic-release/github": "8.0.4",
"@semantic-release/release-notes-generator": "10.0.3",
"@types/jest": "27.4.1",
"@types/mustache": "4.1.2",
"@types/node": "17.0.23",
"@typescript-eslint/eslint-plugin": "5.17.0",
"@typescript-eslint/parser": "5.17.0",
"@types/node": "17.0.25",
"@typescript-eslint/eslint-plugin": "5.20.0",
"@typescript-eslint/parser": "5.20.0",
"conventional-changelog-conventionalcommits": "4.6.3",
"eslint": "8.12.0",
"eslint": "8.13.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-node": "0.3.6",
"eslint-import-resolver-typescript": "2.7.0",
"eslint-plugin-import": "2.25.4",
"eslint-import-resolver-typescript": "2.7.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-prettier": "4.0.0",
"jest": "27.5.1",
"jest-junit": "^13",
"prettier": "2.6.1",
"prettier": "2.6.2",
"semantic-release": "^17.4.6",
"ts-jest": "27.1.4",
"ts-node": "10.7.0",
Expand All @@ -64,14 +65,24 @@
"chalk": "^4.1.2",
"npm": "^6"
},
"prettier": {
"printWidth": 80,
"singleQuote": false,
"quoteProps": "consistent"
},
"eslintConfig": {
"env": {
"jest": true,
"node": true
},
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"root": false,
"plugins": [
"import",
"@typescript-eslint",
"prettier"
],
Expand All @@ -87,20 +98,132 @@
]
},
"import/resolver": {
"alias": {},
"node": {},
"typescript": {
"project": "tsconfig.json",
"alwaysTryTypes": true
}
}
},
"ignorePatterns": [
"*.js",
"*.d.ts",
"node_modules/",
"*.generated.ts",
"coverage"
"coverage",
"*.js",
"*.d.ts"
],
"rules": {
"max-len": [
"error",
{
"code": 140,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreComments": true,
"ignoreRegExpLiterals": true
}
],
"quotes": [
"error",
"double",
{
"avoidEscape": true
}
],
"key-spacing": [
"error"
],
"comma-dangle": [
"error",
"only-multiline"
],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": false
}
],
"array-bracket-spacing": [
"error",
"never"
],
"array-bracket-newline": [
"error",
"consistent"
],
"object-curly-spacing": [
"error",
"always"
],
"object-curly-newline": [
"error",
{
"multiline": true,
"consistent": true
}
],
"object-property-newline": [
"error",
{
"allowAllPropertiesOnSameLine": true
}
],
"keyword-spacing": [
"error"
],
"no-duplicate-imports": [
"error"
],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"space-before-blocks": [
"error"
],
"curly": [
"error",
"multi-line",
"consistent"
],
"semi": [
"error",
"always"
],
"no-return-await": [
"off"
],
"no-trailing-spaces": [
"error"
],
"dot-notation": [
"error"
],
"no-bitwise": [
"error"
],
"quote-props": [
"error",
"consistent-as-needed"
],
"no-shadow": [
"off"
],
"no-multiple-empty-lines": [
"error"
],
"import/no-extraneous-dependencies": [
"error",
{
Expand All @@ -125,13 +248,6 @@
}
}
],
"prettier/prettier": [
"error",
{
"singleQuote": false,
"quoteProps": "consistent"
}
],
"indent": [
"off"
],
Expand Down Expand Up @@ -165,6 +281,13 @@
"method"
]
}
],
"prettier/prettier": [
"error",
{
"singleQuote": false,
"quoteProps": "consistent"
}
]
},
"overrides": [
Expand All @@ -177,13 +300,7 @@
"import/no-extraneous-dependencies": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
}
]
},
"jest": {
"clearMocks": true,
Expand Down
Loading

0 comments on commit ba3e7b9

Please sign in to comment.