-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5817bea
commit 688087b
Showing
98 changed files
with
4,150 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
lib | ||
builds | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
module.exports = { | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:import/recommended", | ||
"plugin:prettier/recommended", | ||
"prettier", | ||
], | ||
rules: { | ||
"prettier/prettier": "error", | ||
"import/extensions": "off", | ||
"import/no-unresolved": ["error", { caseSensitiveStrict: true }], | ||
"import/prefer-default-export": "off", | ||
"import/no-duplicates": "error", | ||
complexity: ["error", 8], | ||
"max-lines": ["error", 200], | ||
"max-depth": ["error", 3], | ||
"max-params": ["error", 4], | ||
eqeqeq: ["error", "smart"], | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
devDependencies: true, | ||
optionalDependencies: false, | ||
peerDependencies: false, | ||
}, | ||
], | ||
"no-shadow": ["error", { hoist: "all" }], | ||
"prefer-const": "error", | ||
"padding-line-between-statements": [ | ||
"error", | ||
{ | ||
blankLine: "always", | ||
prev: "*", | ||
next: "return", | ||
}, | ||
], | ||
"prefer-arrow/prefer-arrow-functions": [ | ||
"error", | ||
{ | ||
disallowPrototype: true, | ||
singleReturnOnly: false, | ||
classPropertiesAllowed: false, | ||
}, | ||
], | ||
"no-restricted-imports": [ | ||
"error", | ||
{ | ||
patterns: [ | ||
{ | ||
group: ["@apdupius/*/*"], | ||
message: | ||
"import of internal modules must be done at the root level.", | ||
}, | ||
], | ||
paths: [ | ||
{ | ||
name: "lodash", | ||
message: "Please use lodash/{module} import instead", | ||
}, | ||
{ | ||
name: ".", | ||
message: "Please use explicit import file", | ||
}, | ||
], | ||
}, | ||
], | ||
curly: ["error", "all"], | ||
"arrow-body-style": ["error", "as-needed"], | ||
}, | ||
root: true, | ||
env: { | ||
es6: true, | ||
node: true, | ||
jest: true, | ||
browser: true, | ||
}, | ||
plugins: ["prefer-arrow", "import", "prettier", "unused-imports"], | ||
parserOptions: { | ||
ecmaVersion: 9, | ||
sourceType: "module", | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["**/*.ts?(x)"], | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:prettier/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
}, | ||
settings: { "import/resolver": { typescript: {} } }, | ||
rules: { | ||
"@typescript-eslint/prefer-optional-chain": "error", | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/prefer-nullish-coalescing": "error", | ||
"@typescript-eslint/strict-boolean-expressions": "error", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-member-accessibility": "off", | ||
"@typescript-eslint/camelcase": "off", | ||
"unused-imports/no-unused-imports": "error", | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "error", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", | ||
"@typescript-eslint/no-unnecessary-condition": "error", | ||
"@typescript-eslint/no-unnecessary-type-arguments": "error", | ||
"@typescript-eslint/prefer-string-starts-ends-with": "error", | ||
"@typescript-eslint/switch-exhaustiveness-check": "error", | ||
// plugin:prettier/recommended turns off arrow-body-style so it is turned back on here | ||
// But a bug can occur and prettier can provide an invalid code (missing closing parenthesis) | ||
// More details here: https://github.com/prettier/eslint-plugin-prettier#arrow-body-style-and-prefer-arrow-callback-issue | ||
"arrow-body-style": ["error", "as-needed"], | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
16.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
yarn.lock | ||
**/coverage | ||
**/lib | ||
**/builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"singleQuote": false, | ||
"trailingComma": "all", | ||
"arrowParens": "avoid", | ||
"importOrder": ["^~/(.*)$", "^[./]"], | ||
"importOrderSeparation": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<coverage generated="1667948314743" clover="3.2.0"> | ||
<project timestamp="1667948314743" name="All files"> | ||
<metrics statements="12" coveredstatements="12" conditionals="0" coveredconditionals="0" methods="6" coveredmethods="6" elements="18" coveredelements="18" complexity="0" loc="12" ncloc="12" packages="3" files="6" classes="6"/> | ||
<package name="parse-schema"> | ||
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/> | ||
<file name="ajv.util.test.ts" path="/Users/thomasaribart/Theodo/json-schema-to-ts/src/parse-schema/ajv.util.test.ts"> | ||
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/> | ||
<line num="3" count="19" type="stmt"/> | ||
</file> | ||
</package> | ||
<package name="utils"> | ||
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/> | ||
<file name="asConst.ts" path="/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/asConst.ts"> | ||
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/> | ||
<line num="16" count="3" type="stmt"/> | ||
</file> | ||
</package> | ||
<package name="utils.type-guards"> | ||
<metrics statements="10" coveredstatements="10" conditionals="0" coveredconditionals="0" methods="5" coveredmethods="5"/> | ||
<file name="ajv.util.test.ts" path="/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/ajv.util.test.ts"> | ||
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/> | ||
<line num="3" count="2" type="stmt"/> | ||
</file> | ||
<file name="compiler.ts" path="/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/compiler.ts"> | ||
<metrics statements="5" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="3"/> | ||
<line num="49" count="1" type="stmt"/> | ||
<line num="56" count="2" type="stmt"/> | ||
<line num="60" count="2" type="stmt"/> | ||
<line num="62" count="2" type="stmt"/> | ||
<line num="63" count="6" type="stmt"/> | ||
</file> | ||
<file name="schema.util.test.ts" path="/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/schema.util.test.ts"> | ||
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/> | ||
<line num="3" count="2" type="stmt"/> | ||
</file> | ||
<file name="validator.ts" path="/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/validator.ts"> | ||
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/> | ||
<line num="50" count="1" type="stmt"/> | ||
<line num="56" count="2" type="stmt"/> | ||
<line num="61" count="6" type="stmt"/> | ||
</file> | ||
</package> | ||
</project> | ||
</coverage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{"/Users/thomasaribart/Theodo/json-schema-to-ts/src/parse-schema/ajv.util.test.ts": {"path":"/Users/thomasaribart/Theodo/json-schema-to-ts/src/parse-schema/ajv.util.test.ts","statementMap":{"0":{"start":{"line":3,"column":19},"end":{"line":3,"column":45}}},"fnMap":{},"branchMap":{},"s":{"0":19},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"6642d21f94591c3e969755fbf594077185077bc2"} | ||
,"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/asConst.ts": {"path":"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/asConst.ts","statementMap":{"0":{"start":{"line":16,"column":23},"end":{"line":16,"column":70}},"1":{"start":{"line":16,"column":62},"end":{"line":16,"column":70}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":16,"column":23},"end":{"line":16,"column":24}},"loc":{"start":{"line":16,"column":62},"end":{"line":16,"column":70}},"line":16}},"branchMap":{},"s":{"0":1,"1":3},"f":{"0":3},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"eb8c42db68ededad94b8c6ca8138264a53c076b3"} | ||
,"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/ajv.util.test.ts": {"path":"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/ajv.util.test.ts","statementMap":{"0":{"start":{"line":3,"column":19},"end":{"line":3,"column":28}}},"fnMap":{},"branchMap":{},"s":{"0":2},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"324f0873adebb87c6cf31d305395f9ca9b3b52c3"} | ||
,"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/compiler.ts": {"path":"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/compiler.ts","statementMap":{"0":{"start":{"line":49,"column":2},"end":{"line":64,"column":3}},"1":{"start":{"line":56,"column":2},"end":{"line":64,"column":3}},"2":{"start":{"line":60,"column":22},"end":{"line":60,"column":59}},"3":{"start":{"line":62,"column":4},"end":{"line":63,"column":44}},"4":{"start":{"line":63,"column":6},"end":{"line":63,"column":43}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":49,"column":2},"end":{"line":49,"column":3}},"loc":{"start":{"line":56,"column":2},"end":{"line":64,"column":3}},"line":56},"1":{"name":"(anonymous_1)","decl":{"start":{"line":56,"column":2},"end":{"line":56,"column":3}},"loc":{"start":{"line":59,"column":7},"end":{"line":64,"column":3}},"line":59},"2":{"name":"(anonymous_2)","decl":{"start":{"line":62,"column":11},"end":{"line":62,"column":12}},"loc":{"start":{"line":63,"column":6},"end":{"line":63,"column":43}},"line":63}},"branchMap":{},"s":{"0":1,"1":2,"2":2,"3":2,"4":6},"f":{"0":2,"1":2,"2":6},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"79e90bd1c7667b35f0fa096654c6bec6ed94ed60"} | ||
,"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/schema.util.test.ts": {"path":"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/schema.util.test.ts","statementMap":{"0":{"start":{"line":3,"column":25},"end":{"line":11,"column":10}}},"fnMap":{},"branchMap":{},"s":{"0":2},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"d941c51c24c6a52e1651db569fe0e0be1f9fb704"} | ||
,"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/validator.ts": {"path":"/Users/thomasaribart/Theodo/json-schema-to-ts/src/utils/type-guards/validator.ts","statementMap":{"0":{"start":{"line":50,"column":2},"end":{"line":61,"column":49}},"1":{"start":{"line":56,"column":2},"end":{"line":61,"column":49}},"2":{"start":{"line":61,"column":4},"end":{"line":61,"column":49}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":50,"column":2},"end":{"line":50,"column":3}},"loc":{"start":{"line":56,"column":2},"end":{"line":61,"column":49}},"line":56},"1":{"name":"(anonymous_1)","decl":{"start":{"line":56,"column":2},"end":{"line":56,"column":3}},"loc":{"start":{"line":61,"column":4},"end":{"line":61,"column":49}},"line":61}},"branchMap":{},"s":{"0":1,"1":2,"2":6},"f":{"0":2,"1":6},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"e2a6019d58fa4b9b5ede915d80b0622d1d50706f"} | ||
} |
Oops, something went wrong.