Skip to content

Commit

Permalink
Fix super linter by adding in new fetch-depth requirement and reforma…
Browse files Browse the repository at this point in the history
…tting files (#49)
  • Loading branch information
stephen-carter-at-sf authored Jan 14, 2025
1 parent e9e9b9d commit b982bd0
Show file tree
Hide file tree
Showing 14 changed files with 14,183 additions and 15,265 deletions.
2 changes: 1 addition & 1 deletion .git2gus/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"regression": "BUG P1",
"bug": "BUG P3"
}
}
}
9 changes: 3 additions & 6 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ rules:
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/explicit-member-accessibility':
['error', { 'accessibility': 'no-public' }],
'@typescript-eslint/explicit-function-return-type':
['error', { 'allowExpressions': true }],
'@typescript-eslint/explicit-member-accessibility': ['error', { 'accessibility': 'no-public' }],
'@typescript-eslint/explicit-function-return-type': ['error', { 'allowExpressions': true }],
'@typescript-eslint/func-call-spacing': ['error', 'never'],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
Expand All @@ -66,8 +64,7 @@ rules:
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars':
['error', { 'argsIgnorePattern': '^_'}],
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'warn',
Expand Down
14 changes: 7 additions & 7 deletions .github/linters/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": ["../../__tests__/**/*", "../../src/**/*"],
"exclude": ["../../dist", "../../dist_local", "../../node_modules", "../../coverage", "*.json"]
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": ["../../__tests__/**/*", "../../src/**/*"],
"exclude": ["../../dist", "../../dist_local", "../../node_modules", "../../coverage", "*.json"]
}
16 changes: 12 additions & 4 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
name: Check Transpiled JavaScript

on:
pull_request:
branches:
- main
push:
branches:
- main
pull_request:

permissions:
contents: read
Expand Down Expand Up @@ -43,18 +45,24 @@ jobs:
id: build
run: npm run bundle

# This will fail the workflow if the PR wasn't created by Dependabot.
# This will fail the workflow if the `dist/` directory is different than
# expected.
- name: Compare Directories
id: diff
run: |
if [ ! -d dist/ ]; then
echo "Expected dist/ directory does not exist. See status below:"
ls -la ./
exit 1
fi
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
# If `dist/` was different than expected, and this was not a Dependabot
# PR, upload the expected version as a workflow artifact.
# If `dist/` was different than expected, upload the expected version as a
# workflow artifact.
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
name: Upload Artifact
id: upload
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: CodeQL

on:
push:
pull_request:
branches:
- main
pull_request:
push:
branches:
- main
schedule:
- cron: '31 7 * * 3'

permissions:
actions: read
checks: write
contents: read
security-events: write

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

permissions:
actions: read
checks: write
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Lint Codebase

on:
pull_request:
branches:
- main
push:
branches:
- main
Expand All @@ -20,6 +22,8 @@ jobs:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
id: setup-node
Expand All @@ -39,9 +43,14 @@ jobs:
DEFAULT_BRANCH: main
FILTER_REGEX_EXCLUDE: dist/**/*
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPESCRIPT_DEFAULT_STYLE: prettier
LINTER_RULES_PATH: ${{ github.workspace }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_MARKDOWN: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_TYPESCRIPT_ES: false
VALIDATE_JSON: false
VALIDATE_TYPESCRIPT_STANDARD: false
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist/
dist_local/
node_modules/
coverage/
coverage/
*.md
36 changes: 22 additions & 14 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf",
"overrides": [
{
"files": "*.yml",
"options": {
"tabWidth": 2
}
}
]
}
Loading

0 comments on commit b982bd0

Please sign in to comment.