Skip to content

Commit

Permalink
repo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Jul 4, 2022
1 parent 0f1b747 commit ec531af
Show file tree
Hide file tree
Showing 15 changed files with 7,155 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.ts
/dist
119 changes: 119 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
const WARN = 1;
const ERROR = 2;

module.exports = {
env: {
browser: true,
node: true,
es2021: true,
},
parserOptions: {
sourceType: "module",
ecmaVersion: 2022,
},
plugins: ["import"],
settings: {
"import/ignore": ["node_modules", "\\.(css|md|svg|json)$"],
"import/resolver": {
[require.resolve("eslint-import-resolver-node")]: {
extensions: [".js"],
},
},
},
rules: {
"array-callback-return": WARN,
"getter-return": WARN,
"new-parens": WARN,
"no-array-constructor": WARN,
"no-caller": ERROR,
"no-cond-assign": [WARN, "except-parens"],
"no-const-assign": ERROR,
"no-control-regex": WARN,
"no-dupe-args": WARN,
"no-dupe-class-members": WARN,
"no-dupe-keys": WARN,
"no-duplicate-case": WARN,
"no-empty-character-class": WARN,
"no-empty-pattern": WARN,
"no-empty": [WARN, { allowEmptyCatch: true }],
"no-eval": ERROR,
"no-ex-assign": WARN,
"no-extend-native": WARN,
"no-extra-bind": WARN,
"no-extra-label": WARN,
"no-extra-boolean-cast": WARN,
"no-func-assign": ERROR,
"no-global-assign": ERROR,
"no-implied-eval": WARN,
"no-invalid-regexp": WARN,
"no-label-var": WARN,
"no-labels": [WARN, { allowLoop: true, allowSwitch: false }],
"no-lone-blocks": WARN,
"no-loop-func": WARN,
"no-mixed-operators": [
WARN,
{
groups: [
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"],
],
allowSamePrecedence: false,
},
],
"no-unsafe-negation": WARN,
"no-new-func": WARN,
"no-new-object": WARN,
"no-octal": WARN,
"no-redeclare": ERROR,
"no-script-url": WARN,
"no-self-assign": WARN,
"no-self-compare": WARN,
"no-sequences": WARN,
"no-shadow-restricted-names": WARN,
"no-sparse-arrays": WARN,
"no-template-curly-in-string": WARN,
"no-this-before-super": WARN,
"no-undef": ERROR,
"no-unreachable": WARN,
"no-unused-expressions": [
WARN,
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
},
],
"no-unused-labels": WARN,
"no-unused-vars": [
WARN,
{
args: "none",
ignoreRestSiblings: true,
},
],
"no-use-before-define": [
WARN,
{ classes: false, functions: false, variables: false },
],
"no-useless-computed-key": WARN,
"no-useless-concat": WARN,
"no-useless-constructor": WARN,
"no-useless-escape": WARN,
"no-useless-rename": [
WARN,
{
ignoreDestructuring: false,
ignoreImport: false,
ignoreExport: false,
},
],
"require-yield": WARN,
"use-isnan": WARN,
"valid-typeof": WARN,
"import/first": ERROR,
"import/no-amd": ERROR,
"import/no-webpack-loader-syntax": ERROR,
},
};
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
*.pem
*.log
*.log*
node_modules
/dist
.cache
coverage
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.yml
node_modules
/dist
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Kent C. Dodds
Copyright (c) 2022 Chance Strickland

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions extend-expect.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
1 change: 1 addition & 0 deletions extend-expect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./src/extend-expect";
8 changes: 8 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { TestingLibraryMatchers } from "./matchers";

declare global {
namespace Vi {
interface Assertion<T = any>
extends TestingLibraryMatchers<typeof expect.stringContaining, T> {}
}
}
Loading

0 comments on commit ec531af

Please sign in to comment.