Skip to content

Commit

Permalink
chore: simplify Svelteimpl (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
etienneburdet authored Mar 14, 2024
1 parent 2da7c53 commit 1779b9c
Show file tree
Hide file tree
Showing 85 changed files with 60,161 additions and 54,648 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/visualizations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ["14.x", "16.17.1"]
node: ["16.17.1"]
os: [ubuntu-latest]

steps:
Expand Down
39 changes: 13 additions & 26 deletions packages/api-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 19 additions & 10 deletions packages/visualizations-react/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
"plugin:react/recommended",
'plugin:react/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
Expand All @@ -17,8 +17,8 @@ module.exports = {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
ecmaFeatures: {
"jsx": true
}
jsx: true,
},
},
settings: {
react: {
Expand All @@ -27,7 +27,7 @@ module.exports = {
},
plugins: ['@typescript-eslint', 'prettier', 'react', 'no-only-tests'],
globals: {
'jest': true
jest: true,
},
rules: {
semi: ['error', 'always'],
Expand Down Expand Up @@ -78,15 +78,18 @@ module.exports = {
],
'no-underscore-dangle': 0,
'react/jsx-one-expression-per-line': 0,
'arrow-parens': [2, 'as-needed', { requireForBlockBody: true }],
'arrow-parens': [2, 'as-needed'],
'react/jsx-props-no-spreading': 0,
'jsx-a11y/label-has-for': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'object-curly-newline': ['error', {
ObjectExpression: { minProperties: 6, multiline: true, consistent: true },
ObjectPattern: { minProperties: 6, multiline: true, consistent: true },
}],
'object-curly-newline': [
'error',
{
ObjectExpression: { minProperties: 6, multiline: true, consistent: true },
ObjectPattern: { minProperties: 6, multiline: true, consistent: true },
},
],
'react/jsx-filename-extension': [2, { extensions: ['.jsx', '.tsx'] }],
'react/react-in-jsx-scope': 'off',
'import/no-named-as-default': 'off',
Expand All @@ -97,6 +100,12 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'off',
// avoid the usage of test.only
'no-only-tests/no-only-tests': 'error',
"react/function-component-definition": [0, { namedComponents: ["function-expression", "arrow-function"], unnamedComponents: "arrow-function" }],
'react/function-component-definition': [
0,
{
namedComponents: ['function-expression', 'arrow-function'],
unnamedComponents: 'arrow-function',
},
],
},
};
11 changes: 11 additions & 0 deletions packages/visualizations-react/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
const path = require('path');

module.exports = {
stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
typescript: {
check: true, // type-check stories during Storybook build
},
webpackFinal: (config) => {
config.resolve.alias = {
...config.resolve.alias,
src: path.resolve(__dirname, '../src'),
reactify: path.resolve(__dirname, '../src/reactify'),
};

return config;
},
};
8 changes: 5 additions & 3 deletions packages/visualizations-react/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module.exports = {
setupFiles: [
'jest-canvas-mock',
],
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: ['<rootDir>/test/setupTests.js'],
testEnvironment: 'jsdom',
moduleNameMapper: {
src: '<rootDir>/src',
reactify: '<rootDir>/src/reactify',
},
};
Loading

1 comment on commit 1779b9c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

95.21%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   index.ts100%100%100%
src/client
   error.ts100%100%100%
   index.ts75.32%100%96.88%124, 13, 146, 148, 148–149, 15, 15, 151, 162, 169, 169, 17, 17, 171, 176, 179, 182, 184, 52, 82
   types.ts100%100%100%
src/odsql
   clauses.ts71.43%80%90.91%14, 32, 42
   index.ts83.72%95.65%94.12%111, 140, 25, 28, 56–57, 57, 57–58, 68, 78–79

Please sign in to comment.