Skip to content

Commit b982bd0

Browse files
Fix super linter by adding in new fetch-depth requirement and reformatting files (#49)
1 parent e9e9b9d commit b982bd0

14 files changed

+14183
-15265
lines changed

.git2gus/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"regression": "BUG P1",
88
"bug": "BUG P3"
99
}
10-
}
10+
}

.github/linters/.eslintrc.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ rules:
4949
'@typescript-eslint/await-thenable': 'error',
5050
'@typescript-eslint/ban-ts-comment': 'error',
5151
'@typescript-eslint/consistent-type-assertions': 'error',
52-
'@typescript-eslint/explicit-member-accessibility':
53-
['error', { 'accessibility': 'no-public' }],
54-
'@typescript-eslint/explicit-function-return-type':
55-
['error', { 'allowExpressions': true }],
52+
'@typescript-eslint/explicit-member-accessibility': ['error', { 'accessibility': 'no-public' }],
53+
'@typescript-eslint/explicit-function-return-type': ['error', { 'allowExpressions': true }],
5654
'@typescript-eslint/func-call-spacing': ['error', 'never'],
5755
'@typescript-eslint/no-array-constructor': 'error',
5856
'@typescript-eslint/no-empty-interface': 'error',
@@ -66,8 +64,7 @@ rules:
6664
'@typescript-eslint/no-require-imports': 'error',
6765
'@typescript-eslint/no-unnecessary-qualifier': 'error',
6866
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
69-
'@typescript-eslint/no-unused-vars':
70-
['error', { 'argsIgnorePattern': '^_'}],
67+
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
7168
'@typescript-eslint/no-useless-constructor': 'error',
7269
'@typescript-eslint/no-var-requires': 'error',
7370
'@typescript-eslint/prefer-for-of': 'warn',

.github/linters/tsconfig.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"$schema": "https://json.schemastore.org/tsconfig",
3-
"extends": "../../tsconfig.json",
4-
"compilerOptions": {
5-
"noEmit": true
6-
},
7-
"include": ["../../__tests__/**/*", "../../src/**/*"],
8-
"exclude": ["../../dist", "../../dist_local", "../../node_modules", "../../coverage", "*.json"]
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"extends": "../../tsconfig.json",
4+
"compilerOptions": {
5+
"noEmit": true
6+
},
7+
"include": ["../../__tests__/**/*", "../../src/**/*"],
8+
"exclude": ["../../dist", "../../dist_local", "../../node_modules", "../../coverage", "*.json"]
99
}

.github/workflows/check-dist.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
name: Check Transpiled JavaScript
1111

1212
on:
13+
pull_request:
14+
branches:
15+
- main
1316
push:
1417
branches:
1518
- main
16-
pull_request:
1719

1820
permissions:
1921
contents: read
@@ -43,18 +45,24 @@ jobs:
4345
id: build
4446
run: npm run bundle
4547

46-
# This will fail the workflow if the PR wasn't created by Dependabot.
48+
# This will fail the workflow if the `dist/` directory is different than
49+
# expected.
4750
- name: Compare Directories
4851
id: diff
4952
run: |
53+
if [ ! -d dist/ ]; then
54+
echo "Expected dist/ directory does not exist. See status below:"
55+
ls -la ./
56+
exit 1
57+
fi
5058
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
5159
echo "Detected uncommitted changes after build. See status below:"
5260
git diff --ignore-space-at-eol --text dist/
5361
exit 1
5462
fi
5563
56-
# If `dist/` was different than expected, and this was not a Dependabot
57-
# PR, upload the expected version as a workflow artifact.
64+
# If `dist/` was different than expected, upload the expected version as a
65+
# workflow artifact.
5866
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
5967
name: Upload Artifact
6068
id: upload

.github/workflows/codeql-analysis.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
name: CodeQL
22

33
on:
4-
push:
4+
pull_request:
55
branches:
66
- main
7-
pull_request:
7+
push:
88
branches:
99
- main
1010
schedule:
1111
- cron: '31 7 * * 3'
1212

13+
permissions:
14+
actions: read
15+
checks: write
16+
contents: read
17+
security-events: write
18+
1319
jobs:
1420
analyze:
1521
name: Analyze
1622
runs-on: ubuntu-latest
1723

18-
permissions:
19-
actions: read
20-
checks: write
21-
contents: read
22-
security-events: write
23-
2424
strategy:
2525
fail-fast: false
2626
matrix:

.github/workflows/linter.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Lint Codebase
22

33
on:
44
pull_request:
5+
branches:
6+
- main
57
push:
68
branches:
79
- main
@@ -20,6 +22,8 @@ jobs:
2022
- name: Checkout
2123
id: checkout
2224
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
2327

2428
- name: Setup Node.js
2529
id: setup-node
@@ -39,9 +43,14 @@ jobs:
3943
DEFAULT_BRANCH: main
4044
FILTER_REGEX_EXCLUDE: dist/**/*
4145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
TYPESCRIPT_DEFAULT_STYLE: prettier
46+
LINTER_RULES_PATH: ${{ github.workspace }}
4347
VALIDATE_ALL_CODEBASE: true
48+
VALIDATE_JAVASCRIPT_ES: false
4449
VALIDATE_JAVASCRIPT_STANDARD: false
4550
VALIDATE_JSCPD: false
4651
VALIDATE_MARKDOWN: false
52+
VALIDATE_MARKDOWN_PRETTIER: false
4753
VALIDATE_NATURAL_LANGUAGE: false
54+
VALIDATE_TYPESCRIPT_ES: false
55+
VALIDATE_JSON: false
56+
VALIDATE_TYPESCRIPT_STANDARD: false

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
dist/
22
dist_local/
33
node_modules/
4-
coverage/
4+
coverage/
5+
*.md

.prettierrc.json

+22-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
{
2-
"printWidth": 120,
3-
"tabWidth": 4,
4-
"useTabs": false,
5-
"semi": false,
6-
"singleQuote": true,
7-
"quoteProps": "as-needed",
8-
"jsxSingleQuote": false,
9-
"trailingComma": "none",
10-
"bracketSpacing": true,
11-
"bracketSameLine": true,
12-
"arrowParens": "avoid",
13-
"proseWrap": "always",
14-
"htmlWhitespaceSensitivity": "css",
15-
"endOfLine": "lf"
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"quoteProps": "as-needed",
8+
"jsxSingleQuote": false,
9+
"trailingComma": "none",
10+
"bracketSpacing": true,
11+
"bracketSameLine": true,
12+
"arrowParens": "avoid",
13+
"proseWrap": "always",
14+
"htmlWhitespaceSensitivity": "css",
15+
"endOfLine": "lf",
16+
"overrides": [
17+
{
18+
"files": "*.yml",
19+
"options": {
20+
"tabWidth": 2
21+
}
22+
}
23+
]
1624
}

0 commit comments

Comments
 (0)