Skip to content

Commit

Permalink
[dom] Add liter and formater
Browse files Browse the repository at this point in the history
  • Loading branch information
smialy committed Jun 29, 2021
1 parent eb61c39 commit 90eede2
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 38 deletions.
14 changes: 14 additions & 0 deletions packages/stool-dom/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{

"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": 0
}
}
7 changes: 7 additions & 0 deletions packages/stool-dom/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"printWidth": 100,
"tabWidth": 4,
"arrowParens": "avoid"
}
52 changes: 27 additions & 25 deletions packages/stool-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
{
"name": "@stool/dom",
"version": "2.4.2",
"version": "2.4.3",
"description": "DOM",
"license": "MIT",
"homepage": "https://github.com/smialy/stool#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/smialy/stool.git"
},
"source": "src/index.ts",
"main": "dist/dom.js",
"module": "dist/dom.mjs",
"types": "dist/dom.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"scripts": {
"build": "microbundle build --target node --tsconfig tsconfig.build.json -f es,cjs --no-compress --no-sourcemap",
"build": "micropack",
"dev": "micropack --watch --no-compress",
"test": "qunit --require ts-node/register tests/*.ts",
"karma": "karma start --single-run",
"lint": "tslint src/*",
"format": "prettier src tests --write",
"prepare": "npm run build",
"version": "npm run build"
},
"exports": {
".": {
"default": "./dist/dom.mjs",
"require": "./dist/dom.js"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"devDependencies": {
"@types/qunit": "^2.9.0",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^1.3.0",
"karma-qunit": "^4.0.0",
"karma-typescript": "^4.1.1",
"microbundle": "^v0.12.0-next.7",
"qunit": "^2.9.3",
"ts-node": "^8.6.2",
"tslint": "^6.0.0",
"typescript": "^3.7.5"
"@stool/micropack": "0.3.0",
"@types/qunit": "2.9.0",
"karma": "4.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-firefox-launcher": "1.3.0",
"karma-qunit": "4.0.0",
"karma-typescript": "4.1.1",
"prettier": "2.3.1",
"qunit": "2.9.3",
"ts-node": "8.6.2",
"tslint": "6.0.0",
"typescript": "3.7.5"
},
"files": [
"dist/*.*",
"dist/**/*.*",
"README.md"
]
],
"repository": {
"type": "git",
"url": "git+https://github.com/smialy/stool.git"
}
}
5 changes: 4 additions & 1 deletion packages/stool-dom/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export function ready(): Promise<any> {
export function ready(): Promise<void> {
return new Promise(resolve => {
if (typeof document === 'undefined') {
resolve();
}
if (document.readyState === 'complete') {
resolve();
} else {
Expand Down
11 changes: 0 additions & 11 deletions packages/stool-dom/tsconfig.build.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/stool-dom/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "esnext",
"module": "commonjs",
"noImplicitAny": false,
"strict": true,
"strict": true
},
"files": [
"src/index.ts"
Expand Down

0 comments on commit 90eede2

Please sign in to comment.