Skip to content

Commit

Permalink
Add prettier and fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jhildenbiddle committed Feb 29, 2024
1 parent cc4d7f0 commit 5632e96
Show file tree
Hide file tree
Showing 18 changed files with 887 additions and 769 deletions.
81 changes: 38 additions & 43 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
module.exports = {
'env': {
'browser' : true,
'commonjs': true,
'es6' : true,
'node' : true
},
'extends': [
'eslint:recommended'
],
'ignorePatterns': [
'dist'
],
'parserOptions': {
'ecmaVersion': 2022,
'sourceType' : 'module'
},
'plugins': [
],
'rules': {
'array-bracket-spacing' : ['error', 'never'],
'array-callback-return' : ['error'],
'block-scoped-var' : ['error'],
'block-spacing' : ['error', 'always'],
'curly' : ['error'],
'dot-notation' : ['error'],
'eqeqeq' : ['error'],
'indent' : ['error', 4],
'no-console' : ['warn'],
'no-floating-decimal' : ['error'],
'no-implicit-coercion' : ['error'],
'no-implicit-globals' : ['error'],
'no-loop-func' : ['error'],
'no-return-assign' : ['error'],
'no-template-curly-in-string': ['error'],
'no-unneeded-ternary' : ['error'],
'no-unused-vars' : ['error', { 'args': 'none' }],
'no-useless-computed-key' : ['error'],
'no-useless-return' : ['error'],
'no-var' : ['error'],
'prefer-const' : ['error'],
'quotes' : ['error', 'single'],
'semi' : ['error', 'always']
}
env: {
browser: true,
commonjs: true,
es6: true,
node: true
},
extends: ['eslint:recommended', 'prettier'],
ignorePatterns: ['dist'],
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module'
},
plugins: [],
rules: {
'array-bracket-spacing': ['error', 'never'],
'array-callback-return': ['error'],
'block-scoped-var': ['error'],
'block-spacing': ['error', 'always'],
curly: ['error'],
'dot-notation': ['error'],
eqeqeq: ['error'],
// 'indent': ['error', 4],
'no-console': ['warn'],
'no-floating-decimal': ['error'],
'no-implicit-coercion': ['error'],
'no-implicit-globals': ['error'],
'no-loop-func': ['error'],
'no-return-assign': ['error'],
'no-template-curly-in-string': ['error'],
'no-unneeded-ternary': ['error'],
'no-unused-vars': ['error', { args: 'none' }],
'no-useless-computed-key': ['error'],
'no-useless-return': ['error'],
'no-var': ['error'],
'prefer-const': ['error'],
quotes: ['error', 'single'],
semi: ['error', 'always']
}
};
16 changes: 8 additions & 8 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"default": true,
"MD001": false,
"MD004": { "style": "consistent" },
"MD013": false,
"MD023": false,
"MD024": false,
"MD033": false,
"MD036": false
"default": true,
"MD001": false,
"MD004": { "style": "consistent" },
"MD013": false,
"MD023": false,
"MD024": false,
"MD033": false,
"MD036": false
}
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"arrowParens": "avoid",
"singleQuote": true,
"trailingComma": "none"
}
8 changes: 2 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"cSpell.words": [
"Codacy",
"jhildenbiddle",
"themeable"
]
}
"cSpell.words": ["Codacy", "jhildenbiddle", "themeable"]
}
38 changes: 19 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,101 +2,101 @@

## 1.6.1

*2024-02-06*
_2024-02-06_

- Fix GitHub workflow badge

## 1.6.0

*2022-09-11*
_2022-09-11_

- Add support for nested tabs (#5)
- Fix tab content margin of first & last element
- Update sessionStorage keys to include namespace

## 1.5.4

*2022-09-10*
_2022-09-10_

- Fix inactive tab content flicker on tab change (#27)
- Fix tab parsing with compressed HTML (#45)

## 1.5.3

*2022-07-29*
_2022-07-29_

- Fix plugin insertion point (fix for docsify-mustache) (#44)
- Update dependencies

## 1.5.2

*2021-09-02*
_2021-09-02_

- Fix code quality badges
- Add GitHub CI

## 1.5.1

*2021-09-02*
_2021-09-02_

- Fix setting active tab from anchor with unicode (#41)

## 1.5.0

*2021-04-27*
_2021-04-27_

- Add support for markdown and HTML in tab labels (#38)
- Update custom style examples in documentation

## 1.4.4

*2020-11-05*
_2020-11-05_

- Fix tab comments with code block rendering (#29)

## 1.4.3

*2020-06-25*
_2020-06-25_

- Fix handling of regex replacement patterns in markdown (#26)

## 1.4.2

*2020-05-11*
_2020-05-11_

- Fix error when no active tab set in URL (#23)

## 1.4.1

*2020-05-09*
_2020-05-09_

- Fix handling of URL encoded anchor IDs (#22)

## 1.4.0

*2020-04-12*
_2020-04-12_

- Add tab selection on hash change
- Fix tab selection based on anchor ID in IE

## 1.3.0

*2020-04-11*
_2020-04-11_

- Add tab selection based on anchor ID in URL (#20)
- Fix tab content container padding and first/last child margins

## 1.2.0

*2020-02-11*
_2020-02-11_

- Update sync behavior to allow synced tab selections across pages (#17)
- Fix rendering of tabset when using tab comments (#16)
- Remove Sentry.io

## 1.1.2

*2019-01-08*
_2019-01-08_

- Add Sentry.io
- Update dependencies
Expand All @@ -106,25 +106,25 @@

## 1.1.0

*2018-11-10*
_2018-11-10_

- Add support for tabsets nested within lists

## 1.0.6

*2018-11-01*
_2018-11-01_

- Fix rendering issue caused by marked package upgrade in docsify 4.8.0

## 1.0.5

*2018-10-11*
_2018-10-11_

- Fix bug that prevented rendering of tabs from markdown with Windows-style
line terminators

## 1.0.0 - 1.0.4

*2018-10-09*
_2018-10-09_

- Initial release
71 changes: 35 additions & 36 deletions docs/assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,62 +1,61 @@
/* Required for browsers w/o shadow DOM support */
iframe[src*="buttons.github.io"] {
margin: 0;
iframe[src*='buttons.github.io'] {
margin: 0;
}

.markdown-section strong code {
font-weight: normal;
font-weight: normal;
}

/* Theme Toggles */
label[data-class-target="label + .docsify-tabs"] {
margin-right: 0.8em;
label[data-class-target='label + .docsify-tabs'] {
margin-right: 0.8em;
}


/* Custom Styles */
/* ========================================================================== */
/* Badges */
.tab-badge,
[data-tab="badge"]:after {
position: absolute;
top: 0;
right: 0;
transform: translate(35%, -45%);
padding: 0.25em 0.35em;
border-radius: 3px;
background: red;
color: white;
font-family: sans-serif;
font-size: 11px;
font-weight: bold;
[data-tab='badge']:after {
position: absolute;
top: 0;
right: 0;
transform: translate(35%, -45%);
padding: 0.25em 0.35em;
border-radius: 3px;
background: red;
color: white;
font-family: sans-serif;
font-size: 11px;
font-weight: bold;
}

[data-tab="badge"]:after {
content: 'New!';
[data-tab='badge']:after {
content: 'New!';
}

/* Active State */
.docsify-tabs__tab--active[data-tab="active state"] {
box-shadow: none;
background: #13547a;
color: white;
.docsify-tabs__tab--active[data-tab='active state'] {
box-shadow: none;
background: #13547a;
color: white;
}
.docsify-tabs__content[data-tab-content="active state"] {
background-image: linear-gradient(0deg, #80d0c7 0%, #13547a 100%);
.docsify-tabs__content[data-tab-content='active state'] {
background-image: linear-gradient(0deg, #80d0c7 0%, #13547a 100%);
}
.docsify-tabs__content[data-tab-content="active state"] p strong {
color: white;
.docsify-tabs__content[data-tab-content='active state'] p strong {
color: white;
}

/* CodePen */
[data-tab-content="codepen"] .cp_embed_wrapper {
position: relative;
top: calc(0px - var(--docsifytabs-content-padding));
left: calc(0px - var(--docsifytabs-content-padding));
width: calc(100% + calc(var(--docsifytabs-content-padding) * 2));
margin-bottom: calc(0px - var(--docsifytabs-content-padding));
[data-tab-content='codepen'] .cp_embed_wrapper {
position: relative;
top: calc(0px - var(--docsifytabs-content-padding));
left: calc(0px - var(--docsifytabs-content-padding));
width: calc(100% + calc(var(--docsifytabs-content-padding) * 2));
margin-bottom: calc(0px - var(--docsifytabs-content-padding));
}

[data-tab-content="codepen"] .cp_embed_wrapper > * {
margin: 0;
[data-tab-content='codepen'] .cp_embed_wrapper > * {
margin: 0;
}
Loading

0 comments on commit 5632e96

Please sign in to comment.