Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lint files which are changed with strict rules #1523

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"eslint-plugin-tsdoc"
],
"rules": {
"react/destructuring-assignment": ["off"],
// "@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"react/destructuring-assignment": ["error"],
"@typescript-eslint/explicit-module-boundary-types": ["error"],
"react/no-multi-comp": [
"error",
{
Expand All @@ -53,7 +52,7 @@
"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
Expand Down Expand Up @@ -118,16 +117,16 @@
],

// Enforces whitespace around equal sign operators
"react/jsx-equals-spacing": ["warn", "never"],
"react/jsx-equals-spacing": ["error", "never"],
"react/no-this-in-sfc": "error",

// All tests must need not have an assertion
"jest/expect-expect": 0,

// Ensures that components are always indented by 2 spaces
"react/jsx-indent": ["warn", 2],
"react/jsx-indent": ["error", 2],
"react/jsx-tag-spacing": [
"warn",
"error",
{
"afterOpening": "never",
"beforeClosing": "never",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
if: steps.changed-files.outputs.only_changed != 'true'
run: npm run typecheck

- name: Run linting check
- name: Run linting check only for modified files with strict rules
if: steps.changed-files.outputs.only_changed != 'true'
run: npm run lint:check
run : npx eslint $(git diff --name-only --diff-filter=d ${{ github.event.before }} ${{ github.sha }} | grep -E '\.(ts|tsx)$')

- name: Compare translation files
run: |
Expand Down
Loading
Loading