Skip to content

Commit

Permalink
chore: update deps (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrelamarche committed Sep 21, 2022
1 parent 6e9fb82 commit 7528bed
Show file tree
Hide file tree
Showing 9 changed files with 8,850 additions and 37,440 deletions.
81 changes: 80 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,80 @@
module.exports = require('@pachyderm/config/eslint.config.js');
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
"plugin:jest/recommended",
],
plugins: ['prefer-arrow', 'testing-library', 'jest'],
env: {
browser: true,
jasmine: true,
jest: true,
es6: true,
},
globals: {
fetchMock: true,
process: true,
},
rules: {
'import/default': 'off',
'import/named': 'off',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
pathGroupsExcludedImportTypes: [],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
selector: 'default',
},
],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'no-useless-return': 'off',
},
settings: {
react: {
pragma: 'React',
version: 'detect',
},
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
parser: '@typescript-eslint/parser',
};
7 changes: 6 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
module.exports = require('@pachyderm/config/prettier.config');
module.exports = {
singleQuote: true,
trailingComma: 'all',
bracketSpacing: false,
arrowParens: 'always',
};
4 changes: 2 additions & 2 deletions examples/opencv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const main = async () => {
const commit = await client
.pfs()
.startCommit({branch: {name: 'master', repo: {name: 'images'}}});
await client
.modifyFile()
const file = await client.pfs().modifyFile();
await file
.setCommit(commit)
.putFileFromFilepath(join(__dirname, 'images/8MN9Kg0.jpg'), '8MN9Kg0.jpg')
.putFileFromFilepath(join(__dirname, 'images/46Q8nDz.jpg'), '46Q8nDz.jpg')
Expand Down
28 changes: 22 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-var-requires */
const baseConfig = require('@pachyderm/config/jest.config');

baseConfig.testEnvironment = 'node';
baseConfig.timers = 'real';

module.exports = baseConfig;
module.exports = {
cacheDirectory: '.jestcache',
clearMocks: true,
collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}'],
coverageReporters: ['text-summary', 'lcov', 'json'],
modulePaths: ['<rootDir>/src/'],
moduleDirectories: ['src', 'node_modules'],
roots: ['<rootDir>/src/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'\\.(gif|jpg|png)$': '<rootDir>/jest.file.mock.js',
},
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
testTimeout: 20000,
timers: 'real',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testEnvironment: 'node',
};
1 change: 1 addition & 0 deletions jest.file.mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = 'test-file-stub';

0 comments on commit 7528bed

Please sign in to comment.