Skip to content

Commit e6e7458

Browse files
committed
feat(active-record-js): initial commit and break off from fractal core
0 parents  commit e6e7458

33 files changed

+1540
-0
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[*]
2+
charset=utf-8
3+
end_of_line=lf
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
6+
indent_style=space
7+
indent_size=4
8+
9+
[*.json]
10+
indent_style=space
11+
indent_size=2
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[*.yml]
17+
insert_final_newline = false

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc.js

+278
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
/*
2+
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
3+
https://github.com/typescript-eslint/tslint-to-eslint-config
4+
5+
It represents the closest reasonable ESLint configuration to this
6+
project's original TSLint configuration.
7+
8+
We recommend eventually switching this configuration to extend from
9+
the recommended rulesets in typescript-eslint.
10+
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
11+
12+
Happy linting! 💖
13+
*/
14+
module.exports = {
15+
"env": {
16+
"browser": true,
17+
"node": true,
18+
"mocha": true
19+
},
20+
"extends": [
21+
"prettier"
22+
],
23+
"parser": "@typescript-eslint/parser",
24+
"parserOptions": {
25+
"project": "tsconfig.json",
26+
"sourceType": "module"
27+
},
28+
"plugins": [
29+
"eslint-plugin-import",
30+
"eslint-plugin-jsdoc",
31+
"eslint-plugin-prefer-arrow",
32+
"@typescript-eslint",
33+
"@typescript-eslint/tslint"
34+
],
35+
"rules": {
36+
"@typescript-eslint/adjacent-overload-signatures": "error",
37+
"@typescript-eslint/array-type": [
38+
"error",
39+
{
40+
"default": "array"
41+
}
42+
],
43+
"@typescript-eslint/ban-types": [
44+
"error",
45+
{
46+
"types": {
47+
"Object": {
48+
"message": "Avoid using the `Object` type. Did you mean `object`?"
49+
},
50+
"Function": {
51+
"message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
52+
},
53+
"Boolean": {
54+
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
55+
},
56+
"Number": {
57+
"message": "Avoid using the `Number` type. Did you mean `number`?"
58+
},
59+
"String": {
60+
"message": "Avoid using the `String` type. Did you mean `string`?"
61+
},
62+
"Symbol": {
63+
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
64+
}
65+
}
66+
}
67+
],
68+
"@typescript-eslint/consistent-type-assertions": "error",
69+
"@typescript-eslint/consistent-type-definitions": "error",
70+
"@typescript-eslint/dot-notation": "error",
71+
"@typescript-eslint/explicit-member-accessibility": [
72+
"off",
73+
{
74+
"accessibility": "explicit"
75+
}
76+
],
77+
"@typescript-eslint/indent": [
78+
"error",
79+
2,
80+
{
81+
"ObjectExpression": "first",
82+
"FunctionDeclaration": {
83+
"parameters": "first"
84+
},
85+
"FunctionExpression": {
86+
"parameters": "first"
87+
},
88+
"SwitchCase": 1
89+
}
90+
],
91+
"@typescript-eslint/member-delimiter-style": [
92+
"error",
93+
{
94+
"multiline": {
95+
"delimiter": "semi",
96+
"requireLast": true
97+
},
98+
"singleline": {
99+
"delimiter": "semi",
100+
"requireLast": false
101+
}
102+
}
103+
],
104+
"@typescript-eslint/member-ordering": "error",
105+
"@typescript-eslint/naming-convention": "off",
106+
"@typescript-eslint/no-empty-function": "error",
107+
"@typescript-eslint/no-empty-interface": "error",
108+
"@typescript-eslint/no-explicit-any": "off",
109+
"@typescript-eslint/no-inferrable-types": "error",
110+
"@typescript-eslint/no-misused-new": "error",
111+
"@typescript-eslint/no-namespace": "off",
112+
"@typescript-eslint/no-parameter-properties": "off",
113+
"@typescript-eslint/no-shadow": [
114+
"error",
115+
{
116+
"hoist": "all"
117+
}
118+
],
119+
"@typescript-eslint/no-this-alias": "error",
120+
"@typescript-eslint/no-unused-expressions": "off",
121+
"@typescript-eslint/no-use-before-define": "off",
122+
"@typescript-eslint/no-var-requires": "error",
123+
"@typescript-eslint/prefer-for-of": "error",
124+
"@typescript-eslint/prefer-function-type": "error",
125+
"@typescript-eslint/prefer-namespace-keyword": "error",
126+
"@typescript-eslint/quotes": [
127+
"error",
128+
"double"
129+
],
130+
"@typescript-eslint/semi": [
131+
"error",
132+
"always"
133+
],
134+
"@typescript-eslint/triple-slash-reference": [
135+
"error",
136+
{
137+
"path": "always",
138+
"types": "prefer-import",
139+
"lib": "always"
140+
}
141+
],
142+
"@typescript-eslint/tslint/config": [
143+
"error",
144+
{
145+
"rules": {
146+
"array-bracket-spacing": [2, "always"],
147+
// "block-spacing": "always",
148+
// "brace-style": "1tbs",
149+
// "no-duplicate-case": true,
150+
// "no-empty-character-class": true,
151+
// "no-ex-assign": true,
152+
// "no-extra-boolean-cast": true,
153+
// "no-extra-semi": true,
154+
// "no-multi-spaces": true,
155+
// "no-unexpected-multiline": true,
156+
// "object-curly-spacing": true,
157+
// "prefer-conditional-expression": true,
158+
// "valid-typeof": true,
159+
"whitespace": true
160+
}
161+
}
162+
],
163+
"@typescript-eslint/type-annotation-spacing": "error",
164+
"@typescript-eslint/unified-signatures": "error",
165+
"arrow-body-style": "error",
166+
"arrow-parens": [
167+
"off",
168+
"always"
169+
],
170+
"brace-style": [
171+
"error",
172+
"1tbs"
173+
],
174+
"comma-dangle": "error",
175+
"complexity": "off",
176+
"constructor-super": "error",
177+
"curly": "off",
178+
"eol-last": "error",
179+
"eqeqeq": [
180+
"error",
181+
"smart"
182+
],
183+
"guard-for-in": "error",
184+
"id-blacklist": [
185+
"error",
186+
"any",
187+
"Number",
188+
"number",
189+
"String",
190+
"string",
191+
"Boolean",
192+
"boolean",
193+
"Undefined",
194+
"undefined"
195+
],
196+
"id-match": "error",
197+
"import/no-extraneous-dependencies": "off",
198+
"import/no-internal-modules": "off",
199+
"import/order": "error",
200+
"jsdoc/check-alignment": "error",
201+
"jsdoc/check-indentation": "error",
202+
"jsdoc/newline-after-description": "off",
203+
"max-classes-per-file": [
204+
"error",
205+
1
206+
],
207+
"max-len": "off",
208+
"new-parens": "error",
209+
"no-bitwise": "error",
210+
"no-caller": "error",
211+
"no-cond-assign": "error",
212+
"no-console": "error",
213+
"no-control-regex": "error",
214+
"no-debugger": "error",
215+
"no-duplicate-case": "error",
216+
"no-duplicate-imports": "error",
217+
"no-empty": "error",
218+
"no-eval": "error",
219+
"no-extra-bind": "error",
220+
"no-fallthrough": "error",
221+
"no-invalid-regexp": "error",
222+
"no-invalid-this": "off",
223+
"no-irregular-whitespace": "error",
224+
"no-multiple-empty-lines": "error",
225+
"no-new-func": "error",
226+
"no-new-wrappers": "error",
227+
"no-redeclare": "error",
228+
"no-regex-spaces": "error",
229+
"no-return-await": "error",
230+
"no-sequences": "error",
231+
"no-sparse-arrays": "error",
232+
"no-template-curly-in-string": "error",
233+
"no-throw-literal": "error",
234+
"no-trailing-spaces": "error",
235+
"no-undef-init": "error",
236+
"no-underscore-dangle": "error",
237+
"no-unsafe-finally": "error",
238+
"no-unused-labels": "error",
239+
"no-var": "error",
240+
"object-shorthand": "error",
241+
"one-var": [
242+
"error",
243+
"never"
244+
],
245+
"prefer-arrow/prefer-arrow-functions": "error",
246+
"prefer-const": "error",
247+
"prefer-object-spread": "error",
248+
"quote-props": [
249+
"error",
250+
"consistent-as-needed"
251+
],
252+
"radix": "error",
253+
"space-before-function-paren": [
254+
"error",
255+
{
256+
"anonymous": "never",
257+
"asyncArrow": "always",
258+
"named": "never"
259+
}
260+
],
261+
"space-in-parens": [
262+
"error",
263+
"never"
264+
],
265+
"spaced-comment": [
266+
"error",
267+
"always",
268+
{
269+
"markers": [
270+
"/"
271+
]
272+
}
273+
],
274+
"use-isnan": "error",
275+
"valid-typeof": "off",
276+
"no-underscore-dangle": ["error", { "allow": ["_id"] }]
277+
}
278+
};

.gitattributes

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.ts text eol=lf
7+
*.js text eol=lf
8+
*.css text eol=lf
9+
*.scss text eol=lf
10+
*.json text eol=lf
11+
*.xml text eol=lf
12+
*.md text eol=lf
13+
*.gitattributes eol=lf
14+
*.gitignore eol=lf
15+
16+
# Denote all files that are truly binary and should not be modified.
17+
*.png binary
18+
*.jpg binary
19+
*.gif binary

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
dist/
2+
localSettings.js
3+
node_modules/
4+
.idea/
5+
.nyc_output/
6+
coverage/
7+
pack
8+
.env
9+
.env.local
10+
.env.production
11+
yarn.lock
12+
yarn-error.log
13+
*.DS_Store
14+
package-lock.json
15+
assets/certs/*
16+
.DS_Store
17+
backend/public
18+
backend/logs/*
19+
boss/build/*
20+
21+
.env.dev

.mocharc.dev.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"bail": true,
3+
"diff": true,
4+
"exit": false,
5+
"extension": [
6+
"ts"
7+
],
8+
"full-trace": true,
9+
"package": "./package.json",
10+
"recursive": true,
11+
"reporter": "spec",
12+
"require": [
13+
"ts-node/register"
14+
],
15+
"slow": 75,
16+
"spec": [
17+
"tests/**/*.spec.ts"
18+
],
19+
"timeout": 60000,
20+
"ui": "bdd",
21+
"watch-files": [
22+
"lib/**/*.js",
23+
"test/**/*.js"
24+
]
25+
}

.mocharc.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"bail": true,
3+
"diff": true,
4+
"exit": true,
5+
"extension": [
6+
"ts"
7+
],
8+
"full-trace": true,
9+
"package": "./package.json",
10+
"recursive": true,
11+
"reporter": "spec",
12+
"require": [
13+
"ts-node/register"
14+
],
15+
"slow": 75,
16+
"spec": [
17+
"tests/**/*.spec.ts"
18+
],
19+
"timeout": 60000,
20+
"ui": "bdd",
21+
"watch-files": [
22+
"lib/**/*.js",
23+
"test/**/*.js"
24+
]
25+
}

0 commit comments

Comments
 (0)