-
-
Notifications
You must be signed in to change notification settings - Fork 76
chart #10
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
base: main
Are you sure you want to change the base?
chart #10
Changes from all commits
13dcba5
e143ca9
26e8590
29d932d
34c85f8
aefb793
a10dfdf
21509f3
7ac49a4
7488515
aa5f55f
8049779
0164ed6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| version: 2.1 | ||
|
|
||
| jobs: | ||
| build: | ||
| docker: | ||
| - image: cimg/node:20.17 | ||
| working_directory: ~/project | ||
| steps: | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - v1-npm-deps-{{ checksum "package-lock.json" }} | ||
| - v1-npm-deps- | ||
| - run: | ||
| name: Install dependencies | ||
| command: npm ci | ||
| - save_cache: | ||
| key: v1-npm-deps-{{ checksum "package-lock.json" }} | ||
| paths: | ||
| - ~/.npm | ||
| - run: | ||
| name: Lint | ||
| command: npm run lint | ||
| - run: | ||
| name: Check formatting | ||
| command: npm run format:check | ||
| - run: | ||
| name: Run tests with coverage | ||
| command: npm run test | ||
| - run: | ||
| name: Build application | ||
| command: npm run build | ||
| - run: | ||
| name: Prepare artifacts | ||
| command: | | ||
| mkdir -p dist | ||
| mkdir -p coverage | ||
| - store_artifacts: | ||
| path: dist | ||
| destination: dist | ||
| - store_artifacts: | ||
| path: coverage | ||
| destination: coverage | ||
|
|
||
| workflows: | ||
| ci: | ||
| jobs: | ||
| - build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| indent_style = space | ||
| indent_size = 2 | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /** | ||
| * Companion file for eslint-plugin-import `import/no-unused-modules` under ESLint flat config. | ||
| * See https://github.com/import-js/eslint-plugin-import/issues/3079 | ||
| */ | ||
| module.exports = { | ||
| root: true, | ||
| ignorePatterns: ['dist', 'node_modules', 'coverage'], | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| echo "" | ||
| echo "🔍 Running pre-commit checks (lint-staged)..." | ||
|
|
||
| if ! npm run lint-staged; then | ||
| echo "" | ||
| echo "❌ Linting or formatting failed. Fix issues before committing." | ||
| exit 1 | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 20.17.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| node_modules | ||
| dist | ||
| build | ||
| coverage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "semi": true, | ||
| "trailingComma": "es5", | ||
| "printWidth": 90 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| import js from '@eslint/js'; | ||
| import globals from 'globals'; | ||
| import importPlugin from 'eslint-plugin-import'; | ||
| import reactPlugin from 'eslint-plugin-react'; | ||
| import reactHooksPlugin from 'eslint-plugin-react-hooks'; | ||
| import testingLibrary from 'eslint-plugin-testing-library'; | ||
| import unusedImports from 'eslint-plugin-unused-imports'; | ||
| import vitestPlugin from 'eslint-plugin-vitest'; | ||
|
|
||
| export default [ | ||
| { | ||
| ignores: ['dist/**', 'node_modules/**', 'coverage/**'], | ||
| }, | ||
| js.configs.recommended, | ||
| { | ||
| files: ['**/*.{js,jsx}'], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint command cannot runMedium Severity Adding Additional Locations (1)Reviewed by Cursor Bugbot for commit 0164ed6. Configure here. |
||
| languageOptions: { | ||
| ecmaVersion: 'latest', | ||
| sourceType: 'module', | ||
| globals: { | ||
| ...globals.browser, | ||
| ...globals.es2024, | ||
| }, | ||
| parserOptions: { | ||
| ecmaFeatures: { | ||
| jsx: true, | ||
| }, | ||
| }, | ||
| }, | ||
| plugins: { | ||
| react: reactPlugin, | ||
| 'react-hooks': reactHooksPlugin, | ||
| import: importPlugin, | ||
| 'unused-imports': unusedImports, | ||
| }, | ||
| settings: { | ||
| react: { | ||
| version: 'detect', | ||
| }, | ||
| 'import/resolver': { | ||
| node: { | ||
| extensions: ['.js', '.jsx', '.json'], | ||
| }, | ||
| }, | ||
| }, | ||
| rules: { | ||
| ...reactPlugin.configs.recommended.rules, | ||
| ...reactHooksPlugin.configs.recommended.rules, | ||
| 'react/react-in-jsx-scope': 'off', | ||
| 'react/prop-types': 'off', | ||
| 'no-unused-vars': 'off', | ||
| 'unused-imports/no-unused-imports': 'error', | ||
| 'unused-imports/no-unused-vars': [ | ||
| 'error', | ||
| { | ||
| argsIgnorePattern: '^_', | ||
| caughtErrorsIgnorePattern: '^_', | ||
| varsIgnorePattern: '^_', | ||
| }, | ||
| ], | ||
| 'import/no-unused-modules': [ | ||
| 'error', | ||
| { | ||
| unusedExports: true, | ||
| ignoreExports: [ | ||
| 'src/**/*.test.js', | ||
| 'src/**/*.test.jsx', | ||
| 'src/mocks/**', | ||
| /** Internal surfaces: same-file “private” exports and re-exports for the partition feature. */ | ||
| 'src/features/drilldown/utils.js', | ||
| 'src/features/drilldown/selectors.js', | ||
| 'src/components/common/partition/partitionChartOptions.js', | ||
| 'src/features/partition/dmaPartitionModel.js', | ||
| 'src/app/store.js', | ||
| 'src/index.jsx', | ||
| 'vite.config.js', | ||
| 'vitest.config.mjs', | ||
| ], | ||
| }, | ||
| ], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint rule breaks existing exportsMedium Severity
Reviewed by Cursor Bugbot for commit 0164ed6. Configure here. |
||
| }, | ||
| }, | ||
| { | ||
| files: ['**/*.{test,spec}.{js,jsx}'], | ||
| languageOptions: { | ||
| ecmaVersion: 'latest', | ||
| sourceType: 'module', | ||
| globals: { | ||
| ...globals.browser, | ||
| ...globals.es2024, | ||
| ...globals.vitest, | ||
| }, | ||
| parserOptions: { | ||
| ecmaFeatures: { | ||
| jsx: true, | ||
| }, | ||
| }, | ||
| }, | ||
| plugins: { | ||
| 'testing-library': testingLibrary, | ||
| vitest: vitestPlugin, | ||
| }, | ||
| rules: { | ||
| ...testingLibrary.configs.react.rules, | ||
| ...vitestPlugin.configs.recommended.rules, | ||
| 'import/no-unused-modules': 'off', | ||
| }, | ||
| }, | ||
| ]; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Simple Adder</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="./src/index.jsx"></script> | ||
| </body> | ||
| </html> |


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-commit hook is not portable
Medium Severity
The
pre-commithook'sset -euo pipefailisn't supported by commonshimplementations likedash. On such systems, the script exits early, preventinglint-stagedfrom running and blocking commits.Reviewed by Cursor Bugbot for commit 0164ed6. Configure here.