Skip to content

Commit

Permalink
cicd: converted eslint config file to yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi-amao-devop committed Oct 29, 2024
1 parent ed27057 commit d5719c7
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 87 deletions.
86 changes: 0 additions & 86 deletions .eslintrc.cjs

This file was deleted.

64 changes: 64 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# .eslintrc.yaml
rules:
no-async-promise-executor: warn

parserOptions:
ecmaVersion: latest
sourceType: module
ecmaFeatures:
jsx: true

env:
browser: true
commonjs: true
es6: true

ignorePatterns:
- "!**/.server"
- "!**/.client"

extends:
- eslint:recommended
- prettier

overrides:
# React
- files: ["**/*.{js,jsx,ts,tsx}"]
plugins: ["react", "jsx-a11y"]
extends:
- plugin:react/recommended
- plugin:react/jsx-runtime
- plugin:react-hooks/recommended
- plugin:jsx-a11y/recommended
settings:
react:
version: "detect"
formComponents: ["Form"]
linkComponents:
- name: "Link"
linkAttribute: "to"
- name: "NavLink"
linkAttribute: "to"
import/resolver:
typescript: {}

# TypeScript
- files: ["**/*.{ts,tsx}"]
plugins: ["@typescript-eslint", "import"]
parser: "@typescript-eslint/parser"
settings:
import/internal-regex: "^~/"
import/resolver:
node:
extensions: [".ts", ".tsx"]
typescript:
alwaysTryTypes: true
extends:
- plugin:@typescript-eslint/recommended
- plugin:import/recommended
- plugin:import/typescript

# Node
- files: [".eslintrc.cjs"]
env:
node: true
2 changes: 1 addition & 1 deletion .github/workflows/quality-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: npx prettier . --check

- name: Run ESLint
run: npx eslint . --config .eslintrc.cjs --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif
run: npx eslint . --config .eslintrc.yml --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif

continue-on-error: false

Expand Down

0 comments on commit d5719c7

Please sign in to comment.