diff --git a/.eslintrc.js b/.eslintrc.js index 1c0936ab2..4595554bd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,18 +1,23 @@ -const esLintConfig = require('kolibri-tools/.eslintrc'); +const esLintConfig = require('kolibri-format/.eslintrc'); -// Vuetify's helper attributes use hyphens and they would -// not be recognized if auto-formatted to camel case -esLintConfig.rules['vue/attribute-hyphenation'] = 0; - -// This rule conflicts with Nuxt page naming -esLintConfig.rules['kolibri/vue-filename-and-component-name-match'] = 0; +const nuxtDocsRules = { + // Vuetify's helper attributes use hyphens and they would + // not be recognized if auto-formatted to camel case + 'vue/attribute-hyphenation': 0, + // This rule conflicts with Nuxt page naming + 'vue/no-reserved-component-names': 0, + // This rule conflicts with Nuxt page naming + 'kolibri/vue-filename-and-component-name-match': 0, + // max-len rules are unhelpful for documentation + 'max-len': 0, + 'vue/max-len': 0, +}; -// This rule is currently disabled in kolibri-tools/.eslintrc -esLintConfig.rules['vue/require-default-prop'] = 1; +esLintConfig.overrides.push({ + files: ['docs/**/*.vue'], + rules: nuxtDocsRules, +}); -// max-len rules are unhelpful for documentation -esLintConfig.rules['max-len'] = 0; -esLintConfig.rules['vue/max-len'] = 0; // Allow nuxt resources to be found esLintConfig.settings['import/resolver'].nuxt = { diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..ce1a84a3d --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,5 @@ +# Run this command to always ignore formatting commits in `git blame` +# git config blame.ignoreRevsFile .git-blame-ignore-revs + +# Applied updated linting for kolibri-format to codebase +cf75a89979022d1f30666613d1a324e9a8da189a diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5fdc8d4e8..2de3c01d8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 10.x + node-version: 18.x - name: Cache Node.js modules uses: actions/cache@v4 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 7698d9fb3..0e16614b0 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '10.x' + node-version: '18.x' registry-url: 'https://registry.npmjs.org' - run: npm publish env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a8e05015c..347627c03 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '10.x' + node-version: '18.x' - name: Cache Node.js modules uses: actions/cache@v4 with: diff --git a/.gitignore b/.gitignore index 9e4bc7763..32b24e294 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,10 @@ docs/jsdocs.js # IDE .idea kolibri-design-system.iml + +# dev playground docs/pages/playground.vue + +# env +.envrc +.python-version diff --git a/.prettierrc.js b/.prettierrc.js index 68851adda..aa0587e6a 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1 +1 @@ -module.exports = require('kolibri-tools/.prettierrc'); +module.exports = require('kolibri-format/.prettierrc'); diff --git a/dev_docs/01_getting_started.md b/dev_docs/01_getting_started.md index d8d0005be..5be8bc409 100644 --- a/dev_docs/01_getting_started.md +++ b/dev_docs/01_getting_started.md @@ -4,8 +4,8 @@ The design system has two primary parts, the UI component library [`/lib`](../li ## Prerequisites -- Node.js 10.x (see [Node Version Manager](https://github.com/nvm-sh/nvm)) -- Yarn 1.x +- Node.js 18.x (see [Node Version Manager](https://github.com/nvm-sh/nvm)) +- Yarn >=1.22.22 ## Troubleshooting diff --git a/docs/assets/definitions.scss b/docs/assets/definitions.scss index d5b47a33d..189800664 100644 --- a/docs/assets/definitions.scss +++ b/docs/assets/definitions.scss @@ -4,5 +4,6 @@ $code-color: #696680; $link-color: #368d74; $link-hover-color: #26614d; $selection-color: #badbd2; -$basic-transition: color 0.25s ease, fill 0.25s ease; +$basic-transition: color 0.25s ease, + fill 0.25s ease; $nav-width: 260px; diff --git a/docs/assets/main.scss b/docs/assets/main.scss index e402ce45a..4b4a0017a 100644 --- a/docs/assets/main.scss +++ b/docs/assets/main.scss @@ -26,6 +26,7 @@ code { a code { color: $link-color; + &:hover { color: $link-hover-color; } @@ -43,6 +44,7 @@ a { &:hover { color: $link-hover-color; + svg { fill: $link-hover-color; } @@ -70,6 +72,7 @@ html { html { box-sizing: border-box; } + *, *::before, *::after { diff --git a/docs/common/DocsAnchorTarget.vue b/docs/common/DocsAnchorTarget.vue index 4042ad365..59a4e2d6a 100644 --- a/docs/common/DocsAnchorTarget.vue +++ b/docs/common/DocsAnchorTarget.vue @@ -14,7 +14,11 @@ /> - # + # @@ -30,10 +34,12 @@ required: true, validator(value) { if (!value.startsWith('#')) { + // eslint-disable-next-line no-console console.error(`'anchor' prop value '${value}' must start with a '#'`); return false; } if (!value.match(/^#[\w\-.:]*$/)) { + // eslint-disable-next-line no-console console.error(`'anchor' prop value '${value}' invalid`); return false; } diff --git a/docs/common/DocsColorBlock.vue b/docs/common/DocsColorBlock.vue index 86fdf3840..71d0db1b9 100644 --- a/docs/common/DocsColorBlock.vue +++ b/docs/common/DocsColorBlock.vue @@ -1,9 +1,15 @@