Use gts instead of eslint

This commit is contained in:
Ed Rivas 2023-06-15 17:47:55 +00:00
parent 5e9aa3c620
commit 299bdf375a
7 changed files with 604 additions and 35 deletions

View File

@ -5,6 +5,7 @@ root = true
[*] [*]
charset = utf-8 charset = utf-8
indent_size = 2 indent_size = 2
end_of_line = lf
indent_style = space indent_style = space
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true

3
.eslintrc.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts/"
}

3
.prettierrc.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
...require('gts/.prettierrc.json'),
};

View File

@ -28,14 +28,14 @@
"build:11ty": "NODE_OPTIONS='-r ts-node/register' eleventy", "build:11ty": "NODE_OPTIONS='-r ts-node/register' eleventy",
"watch:11ty": "yarn build:11ty --serve --incremental", "watch:11ty": "yarn build:11ty --serve --incremental",
"tsc": "tsc", "tsc": "tsc",
"gts": "gts fix",
"gts:ci": "gts lint",
"prettier": "prettier --write .", "prettier": "prettier --write .",
"prettier:ci": "prettier --check .", "prettier:ci": "prettier --check .",
"eslint": "eslint --fix .",
"eslint:ci": "eslint .",
"stylelint": "stylelint '**/*.{css,scss}' --fix", "stylelint": "stylelint '**/*.{css,scss}' --fix",
"stylelint:ci": "stylelint '**/*.{css,scss}'", "stylelint:ci": "stylelint '**/*.{css,scss}'",
"lint": "run-s prettier eslint stylelint tsc", "lint": "run-s prettier gts stylelint tsc",
"lint:ci": "run-s prettier:ci eslint:ci stylelint:ci tsc", "lint:ci": "run-s prettier:ci gts:ci stylelint:ci tsc",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"devDependencies": { "devDependencies": {
@ -68,6 +68,7 @@
"eslint-import-resolver-typescript": "^3.5.5", "eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5", "eslint-plugin-import": "^2.27.5",
"eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-simple-import-sort": "^10.0.0",
"gts": "^3.1.1",
"jquery": "^3.7.0", "jquery": "^3.7.0",
"jquery-ui": "^1.13.2", "jquery-ui": "^1.13.2",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",

View File

@ -6,12 +6,9 @@ $(function () {
active: 0, active: 0,
beforeActivate: function (event, ui) { beforeActivate: function (event, ui) {
// If multiple panels are visible, the CSS tab shouldn't be clickable. // If multiple panels are visible, the CSS tab shouldn't be clickable.
if ( return !(
ui.newPanel.hasClass('css') && ui.newPanel.hasClass('css') && allPanels.filter(':visible').length > 1
allPanels.filter(':visible').length > 1 );
) {
return false;
}
}, },
activate: function (event, ui) { activate: function (event, ui) {
if (ui.newPanel.hasClass('css')) { if (ui.newPanel.hasClass('css')) {

View File

@ -1,9 +1,10 @@
{ {
"extends": "ts-node/node16/tsconfig.json", "extends": "./node_modules/gts/tsconfig-google.json",
"ts-node": { "ts-node": {
"transpileOnly": true "transpileOnly": true
}, },
"compilerOptions": { "compilerOptions": {
"esModuleInterop": true,
"target": "es2022", "target": "es2022",
"lib": ["es2022", "DOM"], "lib": ["es2022", "DOM"],
"isolatedModules": true, "isolatedModules": true,

611
yarn.lock

File diff suppressed because it is too large Load Diff