Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 4a6bc07

Browse files
committed
Initial setup
1 parent 04b3078 commit 4a6bc07

17 files changed

+1387
-2
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.eslintrc.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
10+
"plugin:jsdoc/recommended",
11+
"plugin:prettier/recommended"
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"project": ["./tsconfig.lint.json"],
16+
"warnOnUnsupportedTypeScriptVersion": false
17+
},
18+
"plugins": ["@typescript-eslint", "prettier", "jsdoc", "spellcheck", "inclusive-language"],
19+
"rules": {
20+
"curly": ["error"],
21+
"linebreak-style": ["error", "unix"],
22+
"no-case-declarations": "warn",
23+
"quotes": ["error", "single", { "avoidEscape": true }],
24+
"semi": ["error", "always"],
25+
26+
"@typescript-eslint/ban-ts-comment": "off",
27+
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
28+
"@typescript-eslint/indent": ["error", 2, { "SwitchCase": 1, "ignoredNodes": ["MemberExpression"] }],
29+
"@typescript-eslint/interface-name-prefix": "off",
30+
"@typescript-eslint/member-ordering": "warn",
31+
"@typescript-eslint/no-explicit-any": "off",
32+
"@typescript-eslint/no-inferrable-types": "off",
33+
"@typescript-eslint/no-parameter-properties": "off",
34+
"@typescript-eslint/no-unsafe-assignment": "off",
35+
"@typescript-eslint/no-unused-vars": "off",
36+
"@typescript-eslint/prefer-nullish-coalescing": "warn",
37+
"@typescript-eslint/prefer-optional-chain": "warn",
38+
"@typescript-eslint/prefer-readonly": ["warn"],
39+
"@typescript-eslint/restrict-template-expressions": "off",
40+
"@typescript-eslint/typedef": ["warn", { "memberVariableDeclaration": true, "variableDeclaration": true }],
41+
42+
"jsdoc/match-description": [
43+
"warn",
44+
{
45+
"mainDescription": "/^[A-Z`].+?(\\.|:)(\\n\\n.*((\\n{1,2}- .+)|(_.+_)|`.+`|\\n\\n---))?$/us",
46+
"matchDescription": "^[A-Z`].+(\\.|`.+`)$",
47+
"contexts": ["any"],
48+
"tags": {
49+
"param": true,
50+
"returns": true
51+
}
52+
}
53+
],
54+
"jsdoc/no-types": "error",
55+
"jsdoc/require-jsdoc": [
56+
"warn",
57+
{
58+
"contexts": [
59+
"ClassDeclaration",
60+
"ClassProperty:not([accessibility='private'])",
61+
"ExportNamedDeclaration:has(VariableDeclaration)",
62+
"FunctionExpression",
63+
"MethodDefinition:not([accessibility='private']) > FunctionExpression",
64+
"TSEnumDeclaration",
65+
"TSInterfaceDeclaration",
66+
"TSMethodSignature",
67+
// 'TSPropertySignature',
68+
"TSTypeAliasDeclaration"
69+
]
70+
}
71+
],
72+
"jsdoc/require-param-type": "off",
73+
"jsdoc/require-returns-type": "off",
74+
75+
"spellcheck/spell-checker": [
76+
"warn",
77+
{
78+
"minLength": 3,
79+
"skipWords": []
80+
}
81+
],
82+
83+
"inclusive-language/use-inclusive-words": [
84+
"warn",
85+
{
86+
"allowedTerms": [
87+
{
88+
"term": "/master",
89+
"allowPartialMatches": true
90+
}
91+
],
92+
"words": [
93+
{
94+
"word": "guys",
95+
"suggestions": ["folks"]
96+
}
97+
]
98+
}
99+
]
100+
},
101+
"settings": {
102+
"jsdoc": {
103+
"mode": "typescript"
104+
}
105+
}
106+
}

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Owner
2+
* @Shinigami92

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
node: [12.x, 14.x, 15.x]
16+
fail-fast: false
17+
18+
steps:
19+
- name: Set git to use LF on Windows
20+
if: matrix.os == 'windows-latest'
21+
run: |
22+
git config --global core.autocrlf false
23+
git config --global core.eol lf
24+
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
28+
- name: Set node version to ${{ matrix.node }}
29+
uses: actions/setup-node@v1
30+
with:
31+
node-version: ${{ matrix.node }}
32+
33+
- name: Versions
34+
run: yarn versions
35+
36+
- name: Install dependencies
37+
run: yarn install --frozen-lockfile
38+
39+
- name: Lint
40+
if: matrix.os == 'ubuntu-latest' && matrix.node == '14.x'
41+
run: yarn lint
42+
43+
- name: Build
44+
run: yarn build
45+
46+
- name: Test
47+
run: yarn jest --ci --silent --reporters=default --reporters=jest-junit
48+
49+
- name: Upload test artifact
50+
uses: actions/upload-artifact@v2
51+
if: ${{ always() }}
52+
with:
53+
name: JUnit_${{ matrix.os }}_${{ matrix.node }}_${{ github.sha }}
54+
path: junit.xml
55+
56+
- name: Audit dependencies
57+
run: yarn audit --groups dependencies
58+
59+
- name: Audit peerDependencies
60+
run: yarn audit --groups peerDependencies
61+
62+
- name: Check outdated dependencies
63+
if: github.ref == 'refs/heads/main'
64+
run: yarn outdated

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.github/ISSUE_TEMPLATE/
2+
coverage/
3+
dist/

.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSpacing": true,
4+
"printWidth": 120,
5+
"semi": true,
6+
"singleQuote": true,
7+
"tabWidth": 2,
8+
"trailingComma": "none",
9+
"useTabs": false
10+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "streetsidesoftware.code-spell-checker"]
3+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cSpell.words": ["Quadflieg", "readonly", "typeof"],
3+
"eslint.validate": ["javascript", "typescript"],
4+
"typescript.tsdk": "node_modules/typescript/lib"
5+
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Next
2+
3+
[diff](https://github.com/Shinigami92/eslint-define-config/compare/1.0.0-alpha.1...main)
4+
5+
# 1.0.0-alpha.1
6+
7+
[diff](https://github.com/Shinigami92/eslint-define-config/compare/04b307804a9f9ef6aa288fa6ca167d8336c6145f...1.0.0-alpha.1)
8+
9+
- Initial alpha release

0 commit comments

Comments
 (0)