-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lint): Add ESLint / CommitLint and VSCode config (#37)
* chore: add vscode config #33 * feat: add eslint #33 * chore: apply lint fix #33 * feat: add lint-staged #33 * feat: add commitlint #33 * chore: rename ci file #33 * chore: add lint step in ci #33
- Loading branch information
Showing
17 changed files
with
4,388 additions
and
632 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
// Disable the default formatter, use eslint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
|
||
// Auto fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
|
||
// Silent the stylistic rules in you IDE, but still auto fix them | ||
"eslint.rules.customizations": [ | ||
{ "rule": "style/*", "severity": "off", "fixable": true }, | ||
{ "rule": "format/*", "severity": "off", "fixable": true }, | ||
{ "rule": "*-indent", "severity": "off", "fixable": true }, | ||
{ "rule": "*-spacing", "severity": "off", "fixable": true }, | ||
{ "rule": "*-spaces", "severity": "off", "fixable": true }, | ||
{ "rule": "*-order", "severity": "off", "fixable": true }, | ||
{ "rule": "*-dangle", "severity": "off", "fixable": true }, | ||
{ "rule": "*-newline", "severity": "off", "fixable": true }, | ||
{ "rule": "*quotes", "severity": "off", "fixable": true }, | ||
{ "rule": "*semi", "severity": "off", "fixable": true } | ||
], | ||
|
||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml", | ||
"toml", | ||
"xml", | ||
"gql", | ||
"graphql", | ||
"astro", | ||
"svelte", | ||
"css", | ||
"less", | ||
"scss", | ||
"pcss", | ||
"postcss" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ The package is bundled with [Typescript tsc CLI](https://www.typescriptlang.org/ | |
|
||
```shell | ||
yarn build | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { UserConfig } from '@commitlint/types' | ||
|
||
const Configuration: UserConfig = { | ||
extends: ['@commitlint/config-conventional'], | ||
} | ||
|
||
export default Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu({ | ||
type: 'lib', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,66 @@ | ||
{ | ||
"name": "@teritorio/maplibre-gl-teritorio-cluster", | ||
"type": "module", | ||
"version": "0.0.12", | ||
"packageManager": "[email protected]", | ||
"description": "Allow visualization and interaction with all markers, even when superposed. Can display and interact with small cluster without the need to zoom or uncluster.", | ||
"type": "module", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/maplibre-gl-teritorio-cluster.umd.cjs", | ||
"module": "./dist/maplibre-gl-teritorio-cluster.js", | ||
"types": "./dist/index.d.ts", | ||
"author": "Teritorio", | ||
"license": "MIT", | ||
"homepage": "https://github.com/teritorio/maplibre-gl-teritorio-cluster#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/teritorio/maplibre-gl-teritorio-cluster.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/teritorio/maplibre-gl-teritorio-cluster/issues" | ||
}, | ||
"exports": { | ||
".": { | ||
"import": "./dist/maplibre-gl-teritorio-cluster.js", | ||
"require": "./dist/maplibre-gl-teritorio-cluster.umd.cjs" | ||
} | ||
}, | ||
"main": "./dist/maplibre-gl-teritorio-cluster.umd.cjs", | ||
"module": "./dist/maplibre-gl-teritorio-cluster.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsc && vite build", | ||
"build:demo": "vite build --mode development", | ||
"coverage": "vitest run --coverage", | ||
"dev": "vite", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"preversion": "yarn build", | ||
"prepare": "simple-git-hooks", | ||
"preview": "vite preview", | ||
"test": "vitest" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/teritorio/maplibre-gl-teritorio-cluster.git" | ||
}, | ||
"author": "Teritorio", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/teritorio/maplibre-gl-teritorio-cluster/issues" | ||
"dependencies": { | ||
"@turf/bbox": "^7.1.0", | ||
"@turf/helpers": "^7.1.0", | ||
"maplibre-gl": "^4.7.0" | ||
}, | ||
"homepage": "https://github.com/teritorio/maplibre-gl-teritorio-cluster#readme", | ||
"devDependencies": { | ||
"@vitest/coverage-v8": "2.1.5", | ||
"@antfu/eslint-config": "^3.9.2", | ||
"@commitlint/cli": "^19.6.0", | ||
"@commitlint/config-conventional": "^19.6.0", | ||
"@vitest/coverage-v8": "^2.1.5", | ||
"eslint": "^9.15.0", | ||
"lint-staged": "^15.2.10", | ||
"simple-git-hooks": "^2.11.1", | ||
"typescript": "^5.6.2", | ||
"vite": "^5.4.4", | ||
"vitest": "^2.1.5" | ||
}, | ||
"dependencies": { | ||
"@turf/bbox": "^7.1.0", | ||
"@turf/helpers": "^7.1.0", | ||
"maplibre-gl": "^4.7.0" | ||
"simple-git-hooks": { | ||
"commit-msg": "yarn dlx commitlint --edit $1", | ||
"pre-commit": "yarn dlx lint-staged", | ||
"preserveUnused": true | ||
}, | ||
"packageManager": "[email protected]" | ||
"lint-staged": { | ||
"*": "yarn lint:fix" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export { TeritorioCluster } from "./teritorio-cluster"; | ||
export { TeritorioCluster } from './teritorio-cluster' | ||
export { | ||
buildCss, | ||
unfoldedClusterRenderCircle, | ||
unfoldedClusterRenderHexaGrid, | ||
unfoldedClusterRenderGrid, | ||
unfoldedClusterRenderSmart | ||
} from "./utils/helpers"; | ||
unfoldedClusterRenderHexaGrid, | ||
unfoldedClusterRenderSmart, | ||
} from './utils/helpers' |
Oops, something went wrong.