Skip to content

Commit

Permalink
Merge pull request #1 from Hinaser/v0.0.0
Browse files Browse the repository at this point in the history
v0.0.0 Initial release
  • Loading branch information
Hinaser authored Mar 21, 2021
2 parents b3fb05d + dec79e7 commit d6cf3f3
Show file tree
Hide file tree
Showing 491 changed files with 29,272 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
src/**/__tests__/**
node_modules
.eslintrc.js
webpack.*.js
test/
bin/
nyc.config.js
246 changes: 246 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json",
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
],
"settings": {
},
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "array-simple"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Object": {
"message": "Avoid using the `Object` type. Did you mean `object`?"
},
"Function": {
"message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
},
"Boolean": {
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
},
"Number": {
"message": "Avoid using the `Number` type. Did you mean `number`?"
},
"String": {
"message": "Avoid using the `String` type. Did you mean `string`?"
},
"Symbol": {
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
}
}
}
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/dot-notation": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/indent": [
"error",
2,
{
"SwitchCase": 1,
"ObjectExpression": "first",
"FunctionDeclaration": {
"parameters": "first"
},
"FunctionExpression": {
"parameters": "first"
},
"ignoredNodes": ["TSTypeParameterInstantiation"]
}
],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": [
"camelCase",
"PascalCase",
"UPPER_CASE"
],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
}
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-this-alias": [
"error",
{
"allowDestructuring": true
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": [
"error",
{
"path": "always",
"types": "prefer-import",
"lib": "always"
}
],
"@typescript-eslint/unified-signatures": "error",
"arrow-parens": [
"off",
"always"
],
"brace-style": [
"off",
"off"
],
"complexity": "off",
"constructor-super": "error",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-match": "error",
"import/no-extraneous-dependencies": "error",
"import/no-internal-modules": [
"off",
{
"allow": [
"excluded-module1/*",
"excluded-module2/*"
]
}
],
"import/order": "off",
"max-classes-per-file": "off",
"max-len": [
"error",
{
"ignorePattern": "//|^import |^export ",
"code": 140
}
],
"new-parens": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": "off",
"no-debugger": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-redeclare": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-shadow": [
"error",
{
"hoist": "all"
}
],
"no-sparse-arrays": "error",
"no-template-curly-in-string": "error",
"no-throw-literal": "error",
"no-trailing-spaces": [
"error",
{
"ignoreComments": true,
"skipBlankLines": true
}
],
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "off",
"one-var": [
"error",
"never"
],
"prefer-const": "error",
"prefer-object-spread": "error",
"quotes": ["error", "double"],
"quote-props": [
"error",
"as-needed"
],
"radix": "error",
"space-in-parens": [
"error",
"never"
],
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"use-isnan": "error",
"valid-typeof": "error"
}
};
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test
on:
push:
branches:
- '*'
- '!master'
pull_request:
branches:
- '*'
- '!master'
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node 12
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Make build dir for testing
run: mkdir -p ./test/build

- name: Get yarn version
run: echo "yarn_version=$(yarn -v)" >> $GITHUB_ENV

- name: Get yarn(v1) cache directory path
if: startsWith(env.yarn_version, '1')
run: echo "cache_dir=$(yarn cache dir)" >> $GITHUB_ENV

- name: Get yarn(v2) cache directory path
if: startsWith(env.yarn_version, '2')
run: echo "cache_dir=$(yarn config get cacheFolder)"

- name: Cache Node.js modules
id: yarn-cache
uses: actions/cache@v2
with:
path: ${{ env.cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile

- run: yarn build
- run: yarn test
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,5 @@ $RECYCLE.BIN/
.history/

.idea/

test/dist/

/dist/xspy.*.map
/dist/xspy.js
/dist/xspy.es5.js
/test/coverage/
test/build/
.npmrc
5 changes: 5 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": "./test/setup",
"ui": "bdd",
"recursive": true
}
Loading

0 comments on commit d6cf3f3

Please sign in to comment.