Skip to content

Commit e492222

Browse files
committed
added TypeScript type declarations & moved to new eslint flat config
1 parent 57e43bd commit e492222

13 files changed

+1959
-1482
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ is-it-check
1414

1515
<p>
1616
<div>... for runtime checks of js & ts apps</div>
17-
<div>... because more often than not, static typechecking with typescript for compiletime checks is not enough 🤗</div>
17+
<div>... because more often than not, static typechecking with TypeScript for compile time checks is not enough 🤗</div>
1818
</p>
1919

2020
<ul>
2121
<li>no dependencies</li>
2222
<li>ES6+</li>
2323
<li>tiny & fast</li>
2424
<li>intuitive to use</li>
25+
<li>TypeScript type declarations included</li>
2526
<li>AMD, Node & browser ready</li>
2627
</ul>
2728

eslint.config.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
module.exports = [
2+
{
3+
files: [ "**/*.js" ],
4+
ignores: [ "eslint.config.js", "is-it-check.min.js" ],
5+
// rules are taken from js.configs.recommended
6+
rules: {
7+
'constructor-super': 'error',
8+
'for-direction': 'error',
9+
'getter-return': 'error',
10+
'no-async-promise-executor': 'error',
11+
'no-case-declarations': 'error',
12+
'no-class-assign': 'error',
13+
'no-compare-neg-zero': 'error',
14+
'no-cond-assign': 'error',
15+
'no-const-assign': 'error',
16+
'no-constant-binary-expression': 'error',
17+
'no-constant-condition': 'error',
18+
'no-control-regex': 'error',
19+
'no-debugger': 'error',
20+
'no-delete-var': 'error',
21+
'no-dupe-args': 'error',
22+
'no-dupe-class-members': 'error',
23+
'no-dupe-else-if': 'error',
24+
'no-dupe-keys': 'error',
25+
'no-duplicate-case': 'error',
26+
'no-empty': 'error',
27+
'no-empty-character-class': 'error',
28+
'no-empty-pattern': 'error',
29+
'no-empty-static-block': 'error',
30+
'no-ex-assign': 'error',
31+
'no-extra-boolean-cast': 'error',
32+
'no-fallthrough': 'error',
33+
'no-func-assign': 'error',
34+
'no-global-assign': 'error',
35+
'no-import-assign': 'error',
36+
'no-invalid-regexp': 'error',
37+
'no-irregular-whitespace': 'error',
38+
'no-loss-of-precision': 'error',
39+
'no-misleading-character-class': 'error',
40+
'no-new-native-nonconstructor': 'error',
41+
'no-nonoctal-decimal-escape': 'error',
42+
'no-obj-calls': 'error',
43+
'no-octal': 'error',
44+
'no-prototype-builtins': 'error',
45+
'no-redeclare': 'error',
46+
'no-regex-spaces': 'error',
47+
'no-self-assign': 'error',
48+
'no-setter-return': 'error',
49+
'no-shadow-restricted-names': 'error',
50+
'no-sparse-arrays': 'error',
51+
'no-this-before-super': 'error',
52+
'no-undef': 'warn', // set no-undef from error to warn so the build doesn't exit with exit code 1
53+
'no-unexpected-multiline': 'error',
54+
'no-unreachable': 'error',
55+
'no-unsafe-finally': 'error',
56+
'no-unsafe-negation': 'error',
57+
'no-unsafe-optional-chaining': 'error',
58+
'no-unused-labels': 'error',
59+
'no-unused-private-class-members': 'error',
60+
'no-unused-vars': 'error',
61+
'no-useless-backreference': 'error',
62+
'no-useless-catch': 'error',
63+
'no-useless-escape': 'error',
64+
'no-with': 'error',
65+
'require-yield': 'error',
66+
'use-isnan': 'error',
67+
'valid-typeof': 'error'
68+
},
69+
}
70+
]

0 commit comments

Comments
 (0)