Skip to content

Commit

Permalink
chore: dependency update + lint settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan committed Nov 16, 2019
1 parent ae32baa commit 0398e1d
Show file tree
Hide file tree
Showing 7 changed files with 560 additions and 497 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_style = space
indent_size = 4

[*.rb]
indent_style = space
indent_size = 4
6 changes: 0 additions & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# /node_modules/* in the project root is ignored by default
**/node_modules
# build artefacts
**/dist
**/coverage/*
# data definition files
**/*.d.ts
# 3rd party libs
**/src/public/
# custom definition files
**/src/types/
6 changes: 1 addition & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"rules": {
"import/prefer-default-export": ["off"],
"no-restricted-syntax": ["off", "ForOfStatement"],
"no-console": "off",
"@typescript-eslint/explicit-function-return-type": ["off"],
"@typescript-eslint/explicit-member-accessibility": [
"error",
Expand All @@ -47,10 +46,7 @@
"react/no-unescaped-entities": [
"error",
{
"forbid": [
{ "char": ">", "alternatives": [">"] },
{ "char": "}", "alternatives": ["}"] }
]
"forbid": [{ "char": ">", "alternatives": [">"] }, { "char": "}", "alternatives": ["}"] }]
}
],
"jest/no-disabled-tests": "warn",
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 120,
"singleQuote": false,
"trailingComma": "none"
}
35 changes: 10 additions & 25 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
// // jest.config.js
// // eslint-disable-next-line @typescript-eslint/no-var-requires
// const { pathsToModuleNameMapper } = require("ts-jest/utils");
// // In the following statement, replace `./tsconfig` with the path to your `tsconfig` file
// // which contains the path mapping (ie the `compilerOptions.paths` option):
// // eslint-disable-next-line @typescript-eslint/no-var-requires
// const { compilerOptions } = require("./tsconfig.json");

module.exports = {
// roots: [SRC_PATH],
globals: {
"ts-jest": {
tsConfig: "tsconfig.json"
}
collectCoverageFrom: ["src/**/{!(*.d.ts),}.{ts,js,.tsx,.jsx}"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"^.+\\.(css|scss)$": "identity-obj-proxy"
},
modulePathIgnorePatterns: ["<rootDir>/dist/"],
preset: "ts-jest",
roots: ["<rootDir>/src", "<rootDir>/test"],
setupFilesAfterEnv: ["jest-extended"],
// moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
// prefix: "<rootDir>/"
// }),
moduleFileExtensions: ["ts", "js"],
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/test/jest/flex.test-data"
],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
transform: {
"^.+\\.(ts|tsx)$": "ts-jest"
"^.+\\.tsx?$": "ts-jest"
},
testMatch: ["**/test/**/*.test.(ts|js)"],
testEnvironment: "node",
collectCoverageFrom: ["src/**/{!(*.d.ts),}.{ts,js}"]
verbose: true
};

0 comments on commit 0398e1d

Please sign in to comment.