Skip to content

Commit

Permalink
Replace eslint with biome
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldemoura committed Apr 16, 2024
1 parent 196ae5e commit 3da3952
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 94 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

9 changes: 0 additions & 9 deletions .eslintrc.json

This file was deleted.

46 changes: 23 additions & 23 deletions .htmlhintrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": false,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true,
"alt-require": true,
"doctype-html5": true,
"id-class-value": false,
"style-disabled": false,
"inline-style-disabled": false,
"inline-script-disabled": false,
"space-tab-mixed-disabled": "space",
"id-class-ad-disabled": false,
"href-abs-or-rel": false,
"attr-unsafe-chars": true,
"head-script-disabled": false
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": false,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true,
"alt-require": true,
"doctype-html5": true,
"id-class-value": false,
"style-disabled": false,
"inline-style-disabled": false,
"inline-script-disabled": false,
"space-tab-mixed-disabled": "space",
"id-class-ad-disabled": false,
"href-abs-or-rel": false,
"attr-unsafe-chars": true,
"head-script-disabled": false
}
16 changes: 6 additions & 10 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-recommended",
"stylelint-config-concentric-order"
],
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
}
"extends": ["stylelint-config-standard-scss", "stylelint-config-recommended", "stylelint-config-concentric-order"],
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
}
}
24 changes: 14 additions & 10 deletions _assets/javascripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
/* global Zooming */

document.addEventListener('turbolinks:load', () => {
new Zooming({
bgColor: '#131516',
customSize: '100%',
scaleBase: 0.9,
scaleExtra: 0,
enableGrab: false,
onBeforeOpen: (e) => e.style['border-radius'] = '0',
onBeforeClose: (e) => e.style['border-radius'] = ''
}).listen('img[data-action="zoom"]');
})
new Zooming({
bgColor: '#131516',
customSize: '100%',
scaleBase: 0.9,
scaleExtra: 0,
enableGrab: false,
onBeforeOpen: (e) => {
e.style['border-radius'] = '0';
},
onBeforeClose: (e) => {
e.style['border-radius'] = '';
},
}).listen('img[data-action="zoom"]');
});
26 changes: 26 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": ["_pocs/", "ruby_gems/"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 120
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingComma": "all"
}
}
}
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"name": "migueldemoura.com",
"license": "MIT",
"private": true,
"dependencies": {
"normalize-scss": "^7.0.1",
"turbolinks": "^5.2.0",
"zooming": "^2.1.1"
},
"devDependencies": {
"chart.js": "^4.4.2",
"eslint": "^8.56.0",
"file-saver": "^2.0.5",
"html-minifier-terser": "^7.2.0",
"htmlhint": "^1.1.4",
"remark-cli": "^12.0.0",
"remark-lint": "^10.0.0",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-markdown-style-guide": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"stylelint": "^16.3.1",
"stylelint-config-concentric-order": "^5.2.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-scss": "^6.2.1"
},
"scripts": {
"setup": "bundle install --path ruby_gems && npm install",
"build": "bundle exec jekyll build",
"serve": "bundle exec jekyll serve",
"deploy": "bin/deploy.sh",
"clean": "rm -rf package-lock.json Gemfile.lock node_modules/ _site/ _deploy/ .bundle/ .jekyll-cache/ ruby_gems/",
"lint:scss": "stylelint .",
"lint:js": "eslint .",
"lint:html": "htmlhint _site _deploy",
"lint:md": "remark _posts",
"lint:sh": "shellcheck **/*.sh"
}
"name": "migueldemoura.com",
"license": "MIT",
"private": true,
"dependencies": {
"normalize-scss": "^7.0.1",
"turbolinks": "^5.2.0",
"zooming": "^2.1.1"
},
"devDependencies": {
"chart.js": "^4.4.2",
"@biomejs/biome": "^1.7.0",
"file-saver": "^2.0.5",
"html-minifier-terser": "^7.2.0",
"htmlhint": "^1.1.4",
"remark-cli": "^12.0.0",
"remark-lint": "^10.0.0",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-markdown-style-guide": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"stylelint": "^16.3.1",
"stylelint-config-concentric-order": "^5.2.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-scss": "^6.2.1"
},
"scripts": {
"setup": "bundle install --path ruby_gems && npm install",
"build": "bundle exec jekyll build",
"serve": "bundle exec jekyll serve",
"deploy": "bin/deploy.sh",
"clean": "rm -rf package-lock.json Gemfile.lock node_modules/ _site/ _deploy/ .bundle/ .jekyll-cache/ ruby_gems/",
"lint:scss": "stylelint .",
"lint:js": "biome ci .",
"lint:html": "htmlhint _site _deploy",
"lint:md": "remark _posts",
"lint:sh": "shellcheck **/*.sh"
}
}

0 comments on commit 3da3952

Please sign in to comment.