Skip to content

Commit 3b895e1

Browse files
committed
initial
1 parent 50641c0 commit 3b895e1

File tree

7 files changed

+250
-1
lines changed

7 files changed

+250
-1
lines changed

.eslintrc.cjs

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2020: true,
5+
node: true,
6+
jest: true,
7+
},
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:react/recommended',
11+
'plugin:react/jsx-runtime',
12+
'plugin:react-hooks/recommended',
13+
'airbnb',
14+
'plugin:prettier/recommended',
15+
],
16+
parserOptions: {
17+
ecmaVersion: 'latest',
18+
sourceType: 'module',
19+
ecmaFeatures: {
20+
jsx: true,
21+
},
22+
},
23+
settings: {
24+
react: {
25+
version: 'detect',
26+
},
27+
},
28+
plugins: [
29+
'react',
30+
'react-hooks',
31+
'react-refresh',
32+
'prettier',
33+
'jsx-a11y',
34+
],
35+
rules: {
36+
camelcase: 0,
37+
'react/style-prop-object': 0,
38+
'global-require': 0,
39+
'import/newline-after-import': 0,
40+
'import/no-dynamic-require': 0,
41+
'import/no-extraneous-dependencies': 0,
42+
'jsx-a11y/anchor-is-valid': ['error'],
43+
'no-console': 0,
44+
'no-duplicate-imports': 0,
45+
'no-unused-vars': [
46+
'error',
47+
{
48+
argsIgnorePattern: '^_', // Ignore params starting with underscore
49+
varsIgnorePattern: '^_', // Ignore variables starting with underscore
50+
caughtErrorsIgnorePattern: '^_', // Ignore caught errors starting with underscore
51+
},
52+
],
53+
'one-var': 0,
54+
'prettier/prettier': ['error'],
55+
'react/forbid-prop-types': [0, { checkChildContextTypes: false }],
56+
'react/jsx-filename-extension': [1, { extensions: ['.jsx'] }],
57+
'react/jsx-props-no-spreading': 0,
58+
'react/jsx-sort-props': ['error'],
59+
'react/prop-types': 0,
60+
'react/sort-comp': ['error'],
61+
'object-literal-sort-keys': 0,
62+
'react/jsx-no-target-blank': 'off',
63+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
64+
semi: ['error', 'always'],
65+
},
66+
ignorePatterns: ['**/dist/**', '**/node_modules/**', '**/build/**', '**/coverage/**'],
67+
};

.github/workflows/node.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Node.js CI
22

3-
on: [push]
3+
on:
4+
push:
45

56
jobs:
67
build:

.github/workflows/qlty.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Code Quality Check
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
quality:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v5
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Install qlty
27+
run: |
28+
# Install qlty using official install script
29+
curl https://qlty.sh | sh
30+
echo "$HOME/.qlty/bin" >> $GITHUB_PATH
31+
32+
- name: Run qlty check
33+
run: qlty check

.qlty/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*
2+
!configs
3+
!configs/**
4+
!hooks
5+
!hooks/**
6+
!qlty.toml
7+
!.gitignore

.qlty/configs/.hadolint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignored:
2+
- DL3008

.qlty/configs/.yamllint.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
extends: default
2+
3+
rules:
4+
document-start: disable
5+
quoted-strings:
6+
required: only-when-needed
7+
extra-allowed: ["{|}"]
8+
key-duplicates: {}
9+
octal-values:
10+
forbid-implicit-octal: true
11+
line-length: disable
12+
indentation: disable
13+
new-line-at-end-of-file: disable
14+
trailing-spaces: disable
15+
brackets: disable
16+
colons: disable
17+
empty-lines: disable
18+
comments: disable
19+
braces: disable
20+
comments-indentation: disable
21+
commas: disable

.qlty/qlty.toml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# This file was automatically generated by `qlty init`.
2+
# You can modify it to suit your needs.
3+
# We recommend you to commit this file to your repository.
4+
#
5+
# This configuration is used by both Qlty CLI and Qlty Cloud.
6+
#
7+
# Qlty CLI -- Code quality toolkit for developers
8+
# Qlty Cloud -- Fully automated Code Health Platform
9+
#
10+
# Try Qlty Cloud: https://qlty.sh
11+
#
12+
# For a guide to configuration, visit https://qlty.sh/d/config
13+
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
14+
config_version = "0"
15+
16+
exclude_patterns = [
17+
"*_min.*",
18+
"*-min.*",
19+
"*.min.*",
20+
"**/.yarn/**",
21+
"**/*.d.ts",
22+
"**/assets/**",
23+
"**/bower_components/**",
24+
"**/build/**",
25+
"**/cache/**",
26+
"**/config/**",
27+
"**/db/**",
28+
"**/deps/**",
29+
"**/dist/**",
30+
"**/extern/**",
31+
"**/external/**",
32+
"**/generated/**",
33+
"**/Godeps/**",
34+
"**/gradlew/**",
35+
"**/mvnw/**",
36+
"**/node_modules/**",
37+
"**/protos/**",
38+
"**/seed/**",
39+
"**/target/**",
40+
"**/templates/**",
41+
"**/testdata/**",
42+
"**/vendor/**",
43+
]
44+
45+
test_patterns = [
46+
"**/test/**",
47+
"**/spec/**",
48+
"**/*.test.*",
49+
"**/*.spec.*",
50+
"**/*_test.*",
51+
"**/*_spec.*",
52+
"**/test_*.*",
53+
"**/spec_*.*",
54+
]
55+
56+
[smells]
57+
mode = "comment"
58+
59+
[[source]]
60+
name = "default"
61+
default = true
62+
63+
64+
[[plugin]]
65+
name = "actionlint"
66+
67+
[[plugin]]
68+
name = "dockerfmt"
69+
70+
[[plugin]]
71+
name = "dotenv-linter"
72+
mode = "comment"
73+
74+
[[plugin]]
75+
name = "eslint"
76+
version = "8.57.1"
77+
package_file = "package.json"
78+
package_filters = ["eslint", "jest", "prettier"]
79+
80+
[[plugin]]
81+
name = "hadolint"
82+
83+
[[plugin]]
84+
name = "markdownlint"
85+
drivers = [
86+
"lint",
87+
]
88+
mode = "comment"
89+
90+
[[plugin]]
91+
name = "osv-scanner"
92+
93+
[[plugin]]
94+
name = "prettier"
95+
96+
[[plugin]]
97+
name = "radarlint-iac"
98+
mode = "monitor"
99+
100+
[[plugin]]
101+
name = "radarlint-js"
102+
103+
[[plugin]]
104+
name = "ripgrep"
105+
mode = "comment"
106+
107+
[[plugin]]
108+
name = "trivy"
109+
drivers = [
110+
"config",
111+
"fs-vuln",
112+
]
113+
114+
[[plugin]]
115+
name = "trufflehog"
116+
117+
[[plugin]]
118+
name = "yamllint"

0 commit comments

Comments
 (0)