Skip to content

Commit

Permalink
refactor: small changes (#276)
Browse files Browse the repository at this point in the history
Co-authored-by: Almanov Nikita <[email protected]>
  • Loading branch information
github-actions[bot] and nikkeyl authored Oct 22, 2024
1 parent caa6334 commit 06177c8
Show file tree
Hide file tree
Showing 21 changed files with 949 additions and 1,080 deletions.
5 changes: 0 additions & 5 deletions .browserslistrc

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.13

- name: Lint
uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: pnpm i

- name: Build
run: pnpm build
run: pnpm rollup -c rollup.config.ts --configPlugin typescript

- name: Create Release
env:
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
pnpm-lock.yaml

# *rc
.browserslistrc
.ecrc
.npmrc

Expand Down
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default defineConfig({
opacity: 0;
position: fixed;
inset: 0;
z-index: 1;
pointer-events: none;
}
```
Expand All @@ -74,6 +75,7 @@ export default defineConfig({

position: fixed;
inset: 0;
z-index: 1;

pointer-events: none;
}
Expand Down Expand Up @@ -111,6 +113,8 @@ export default defineConfig({
Sorts **over 400 properties** for enhanced clarity and maintainability.

> Properties are logically grouped and separated by a space.
> A space between groups will only appear if the group
> has 3 or more properties.
- [`stylelint-plugin-defensive-css`](https://github.com/yuschick/stylelint-plugin-defensive-css):
Enforcing defensive **CSS** best practices.
Expand All @@ -134,20 +138,6 @@ export default defineConfig({
],
```

- [`stylelint-no-unsupported-browser-features`](https://github.com/RJWadley/stylelint-no-unsupported-browser-features):
Disallow features that aren't supported by your target browser audience.

> For this plugin, `.browserslistrc` is already configured
> with the following options:
> `> 1.5%`
> `Firefox ESR`
> `last 2 versions`
> `not dead`
> `not op_mini all`

If you want to use your own config, then create a `.browserslistrc`
file in your project's root.

### Rules

This is a list of the lints turned on in this configuration, and what they do.
Expand Down
26 changes: 12 additions & 14 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
import { defineFlatConfig } from 'eslint-define-config';
import { extend } from '@archoleat/eslint-flat-compatibility';

import globals from 'globals';

import importSortPlugin from 'eslint-plugin-simple-import-sort';
import parser from '@typescript-eslint/parser';
import prettierConfig from 'eslint-config-prettier';
import unicornPlugin from 'eslint-plugin-unicorn';

import parser from '@typescript-eslint/parser';

export default defineFlatConfig([
...extend(
'airbnb-base',
'airbnb-typescript/base',
'plugin:import/recommended',
'plugin:import/typescript',
),
unicornPlugin.configs['flat/recommended'],
...extend('airbnb-base', 'airbnb-typescript/base'),
{
files: ['src/**/*.ts'],
languageOptions: {
parser,
ecmaVersion: 'latest',
globals: {
...globals.node,
...globals.es2015,
},
parserOptions: {
ecmaVersion: 'latest',
project: 'tsconfig.json',
},
sourceType: 'module',
Expand All @@ -36,16 +29,21 @@ export default defineFlatConfig([
},
},
},
plugins: {
'simple-import-sort': importSortPlugin,
unicorn: unicornPlugin,
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'import/exports-last': 'error',
'import/extensions': ['error', { ts: 'always' }],
'import/group-exports': 'error',
'import/no-commonjs': 'error',
'import/no-default-export': 'error',
'import/no-default-export': 'off',
'import/no-namespace': 'error',
'import/no-unassigned-import': 'error',
'import/prefer-default-export': 'off',
'unicorn/no-null': 'off',
'unicorn/no-unused-properties': 'error',
'unicorn/string-content': 'error',
},
Expand Down
47 changes: 22 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"stylelint-gamut",
"stylelint-group-selectors",
"stylelint-high-performance-animation",
"stylelint-no-unsupported-browser-features",
"stylelint-order",
"stylelint-plugin-defensive-css",
"stylelint-plugin-logical-css",
Expand All @@ -53,70 +52,68 @@
".": "./index.js"
},
"files": [
".browserslistrc",
"index.js"
],
"scripts": {
"init": "pnpm i && husky",
"build": "rollup -c rollup.config.ts --configPlugin typescript"
"init": "pnpm i && husky"
},
"peerDependencies": {
"stylelint": "^14.0.0 || ^15.0.0 || ^16.0.0"
},
"dependencies": {
"@archoleat/reglib": "^1.1.0",
"prettier": "^3.3.3",
"stylelint": "^16.9.0",
"stylelint": "^16.10.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
"stylelint-gamut": "^1.3.4",
"stylelint-group-selectors": "^1.0.10",
"stylelint-high-performance-animation": "^1.10.0",
"stylelint-no-unsupported-browser-features": "^8.0.1",
"stylelint-order": "^6.0.4",
"stylelint-plugin-defensive-css": "^1.0.4",
"stylelint-plugin-logical-css": "^1.2.1",
"stylelint-prettier": "^5.0.2",
"stylelint-rem-over-px": "^1.0.1"
},
"devDependencies": {
"@archoleat/commitlint-define-config": "^1.0.11",
"@archoleat/eslint-flat-compatibility": "^1.1.8",
"@archoleat/prettier-define-config": "^1.0.2",
"@archoleat/semantic-release-define-config": "^1.1.16",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@commitlint/types": "^19.0.3",
"@rollup/plugin-typescript": "^11.1.6",
"@archoleat/commitlint-define-config": "^1.1.0",
"@archoleat/eslint-flat-compatibility": "^1.2.0",
"@archoleat/prettier-define-config": "^1.1.0",
"@archoleat/semantic-release-define-config": "^1.2.0",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@commitlint/types": "^19.5.0",
"@rollup/plugin-typescript": "^12.1.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-v8": "^2.0.5",
"@vitest/coverage-v8": "^2.1.3",
"conventional-changelog-conventionalcommits": "^8.0.0",
"editorconfig-checker": "^5.1.8",
"eslint": "^8.57.0",
"editorconfig-checker": "^6.0.0",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-define-config": "^2.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unicorn": "^55.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unicorn": "^56.0.0",
"git-pull-run": "^1.4.0",
"globals": "^15.9.0",
"husky": "^9.1.5",
"globals": "^15.11.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"remark": "15.0.1",
"remark-cli": "^12.0.1",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-markdown-style-guide": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"rollup": "^4.21.2",
"rollup": "^4.24.0",
"rollup-plugin-esbuild": "^6.1.1",
"semantic-release": "^24.1.0",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
"semantic-release": "^24.1.2",
"typescript": "^5.6.3",
"vitest": "^2.1.3"
}
}
Loading

0 comments on commit 06177c8

Please sign in to comment.