chore(tools): lint all files, simplify npm lint script command (#1074)

Co-authored-by: chris <chris@bumblehead.com>
pull/1081/head
iambumblehead 1 year ago committed by GitHub
parent c17b3435af
commit 1487e0a1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,6 @@
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"ignorePatterns": ["build"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
@ -15,10 +14,16 @@
"browser": true,
"node": false
},
"ignorePatterns": ["browserstack-browsers.js", "web-test-runner.config.js"],
"ignorePatterns": [
"browserstack-browsers.js",
"web-test-runner.config.js",
"build",
"coverage"
],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"excludedFiles": ["README*/**"],
"parserOptions": {
"project": ["./tsconfig.json", "test/tsconfig.json"]
},
@ -63,6 +68,21 @@
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": ["README*md/*.tsx"],
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"import/no-unresolved": "off"
}
},
{
"files": ["CHANGELOG.md/*"],
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"import/no-unresolved": "off",
"node/no-missing-import": "off"
}
}
],
"rules": {

@ -234,7 +234,7 @@ Whether or not to set a boolean attribute is now determined by looking at the va
```js
h("div", {
attrs: {
foo: true // will be set a boolean attribute since `true` is a boolean
foo: true, // will be set a boolean attribute since `true` is a boolean
bar: "baz" // will set a normal attribute
}
});
@ -366,10 +366,12 @@ The biggest change in this release is that the Snabbdom source code has been por
The TypeScript rewrite uses the `import` and `export` features introduced in ECMAScript 2015. Unfortunately the ES imports have no analogy to the CommonJS pattern of setting `module.exports`. This means that the Snabbdom modules that previously used this feature now have to be imported in a slightly different way.
```js
var h = require("snabbdom/h"); // The old way
var h = require("snabbdom/h").h; // The new way
var h = require("snabbdom/h").default; // Alternative new way
var { h } = require("snabbdom/h"); // Using destructuring
/* eslint-disable no-redeclare */
const h = require("snabbdom/h"); // The old way
const h = require("snabbdom/h").h; // The new way
const h = require("snabbdom/h").default; // Alternative new way
const { h } = require("snabbdom/h"); // Using destructuring
/* eslint-enable no-redeclare */
```
## [v0.6.0] - 2017-01-05

@ -36,7 +36,7 @@
"format": "prettier --write .",
"format-check": "prettier --check .",
"prepare": "husky install",
"lint": "eslint --ext .ts,.tsx,.js --ignore-path .gitignore .",
"lint": "eslint .",
"unit": "web-test-runner \"test/unit/*.{ts,tsx}\" --node-resolve --coverage",
"release": "npm run test && release-it",
"test": "npm run build && npm run lint && npm run unit",

Loading…
Cancel
Save