File tree Expand file tree Collapse file tree 6 files changed +85
-47
lines changed
Expand file tree Collapse file tree 6 files changed +85
-47
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Lint Code
2+
3+ on :
4+ push :
5+ branches :
6+ - ' *'
7+ pull_request :
8+ branches :
9+ - ' *'
10+
11+ jobs :
12+ lint :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v3
17+
18+ # Sets up Node.js environment
19+ - name : Set up Node.js
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : ' 20'
23+
24+ # Installs dependencies
25+ - name : Install dependencies
26+ run : npm install
27+
28+ # Runs ESLint
29+ - name : Run ESLint
30+ run : npx eslint --fix ./src
31+
32+ # Displays result
33+ - name : Check for ESLint errors
34+ run : |
35+ if npx eslint --fix ./src; then
36+ echo "Linting passed!"
37+ else
38+ echo "Linting failed!"
39+ exit 1
40+ fi
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import eslint from '@eslint/js' ;
2+ import tseslint from 'typescript-eslint' ;
3+ import typescriptParser from '@typescript-eslint/parser' ;
4+ import stylisticJs from '@stylistic/eslint-plugin-js' ;
5+
6+ export default [
7+ eslint . configs . recommended ,
8+ ...tseslint . configs . recommended ,
9+ {
10+ ignores : [ 'dist' , 'node_modules' ] ,
11+ plugins : {
12+ '@stylistic/js' : stylisticJs ,
13+ } ,
14+ languageOptions : {
15+ sourceType : 'module' ,
16+ ecmaVersion : 2024 ,
17+ parser : typescriptParser
18+ } ,
19+ rules : {
20+ 'strict' : 'error' ,
21+ 'no-var' : 'error' ,
22+ 'array-callback-return' : 'error' ,
23+ 'yoda' : 'error' ,
24+ '@stylistic/js/indent' : [
25+ 'error' ,
26+ 4 ,
27+ ] ,
28+ '@stylistic/js/linebreak-style' : [
29+ 'error' ,
30+ 'unix'
31+ ] ,
32+ '@stylistic/js/quotes' : [
33+ 'error' ,
34+ 'double'
35+ ] ,
36+ '@stylistic/js/semi' : [
37+ 'error' ,
38+ 'always'
39+ ] ,
40+ '@typescript-eslint/no-unused-vars' : 'error' ,
41+ '@typescript-eslint/ban-ts-comment' : 'off' ,
42+ '@typescript-eslint/no-non-null-assertion' : 'off'
43+ }
44+ }
45+ ] ;
You can’t perform that action at this time.
0 commit comments