Skip to content

Commit

Permalink
feat: add linting (#2)
Browse files Browse the repository at this point in the history
* feat: add ESLint, addressed issues

* refactor: update GitHub Actions workflow for linting
  • Loading branch information
barrenechea authored Oct 7, 2024
1 parent 451fc57 commit ea0f312
Show file tree
Hide file tree
Showing 9 changed files with 1,744 additions and 134 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ concurrency:
cancel-in-progress: true

jobs:
# lint:
# name: Linting rules
# runs-on: ubuntu-latest
lint:
name: Linting rules
runs-on: ubuntu-latest

# steps:
# - name: Checkout
# uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version-file: .nvmrc
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

# - name: Install dependencies
# run: npm ci
- name: Install dependencies
run: npm ci

# - name: Linting rules
# run: npm run lint
- name: Linting rules
run: npm run lint

build:
name: Build
Expand Down
21 changes: 21 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import js from "@eslint/js";
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";

export default [
{ files: ["**/*.{js,mjs,cjs,ts}"] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
];
Loading

0 comments on commit ea0f312

Please sign in to comment.