Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
16 changes: 11 additions & 5 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: check
on: [push]
on:
push:
tags-ignore:
- '[0-9]+.[0-9]+.[0-9]+'
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- run: yarn install
node-version: lts/*
- run: npm install
- run: make check
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

permissions:
id-token: write # Required for OIDC
contents: read

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'

# Ensure npm 11.5.1 or later is installed
- name: update npm
run: npm install -g npm@latest
- run: npm install
- run: make check
- run: npm publish
15 changes: 0 additions & 15 deletions .jshintrc

This file was deleted.

12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
check: lint test

lint:
./node_modules/.bin/jshint *.js lib test
./node_modules/.bin/biome ci

format:
./node_modules/.bin/biome check --fix

test:
./node_modules/.bin/mocha --recursive --require should
node --test $(TEST_OPTS)

test-cov: TEST_OPTS := --experimental-test-coverage
test-cov: test

.PHONY: check lint test
.PHONY: check format lint test test-cov
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ npm install --save @furkot/osmand-data
Furkot pin symbols are characters in [furkot-icon-font] - see [here][furkot-icon-font-demo].

```js
var data = require('@furkot/osmand-data');
import data from '@furkot/osmand-data';

console.log(data.toFurkot['building_type_church']); // === 34
console.log(data.toOsmand['34']); // === 'building_type_church'
Expand Down
62 changes: 62 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"lineWidth": 120
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "none",
"arrowParentheses": "asNeeded"
}
},
"json": {
"formatter": {
"expand": "always"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
},
"complexity": {
"noForEach": "off"
},
"style": {
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"useBlockStatements": "error",
"useDefaultParameterLast": "error",
"useNumberNamespace": "error",
"useSingleVarDeclarator": "error"
},
"performance": {
"noDelete": "off"
},
"suspicious": {
"noAssignInExpressions": "off"
}
}
}
}
1 change: 0 additions & 1 deletion index.js

This file was deleted.

Loading