Skip to content

Commit

Permalink
feat(all): Add CI and Misti 0.3.1 support
Browse files Browse the repository at this point in the history
Closes #5
  • Loading branch information
jubnzv committed Sep 24, 2024
1 parent 6457ce8 commit 23fcd54
Show file tree
Hide file tree
Showing 8 changed files with 1,372 additions and 391 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
"project": true
},
extends: [
"plugin:@typescript-eslint/recommended",
],
ignorePatterns: ["src/detectors/templates"],
plugins: [
"@typescript-eslint",
],
rules: {
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
]
}
};
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

jobs:
test:
strategy:
fail-fast: false
matrix:
node-version: [22]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout Blueprint Misti
uses: actions/checkout@v2

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"

- name: Install npm dependencies
run: yarn install

- name: Build
run: |
yarn build
- name: Spellcheck code base
run: |
yarn spell
- name: Run knip
run: yarn knip

- name: Check formatting with Prettier
run: yarn fmt

- name: Run ESLint
run: yarn lint
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Misti 0.3.1 support

## [0.3.1] - 2024-09-22
### Fixed
- API compatibility issues.
- API compatibility issues

## [0.3.0] - 2024-09-22
### Added
- Misti 0.3.0 support.
- Misti 0.3.0 support
17 changes: 17 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"language": "en",
"words": [
"nowarp",
"Georgiy",
"Komarov"
],
"flagWords": [],
"ignorePaths": [
"tags",
"*.fif",
"node_modules",
"dist"
]
}
12 changes: 12 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": [
"src/index.ts",
""
],
"project": [
"src/**/*.ts"
],
"ignoreExportsUsedInFile": true,
"ignoreDependencies": []
}
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nowarp/blueprint-misti",
"version": "0.3.1",
"description": "Bluerpint Misti Plugin",
"description": "Blueprint Misti Plugin",
"bugs": "https://github.com/nowarp/blueprint-misti/issues",
"main": "dist/index.js",
"author": "Georgiy Komarov <[email protected]>",
Expand All @@ -21,7 +21,11 @@
"scripts": {
"build": "tsc",
"clean": "rm -rf dist",
"fmt": "prettier --write src",
"fmt": "prettier --check src",
"lint": "eslint src",
"spell": "cspell \"**\" --no-progress --exclude \"dist/**\" --exclude \"node_modules/**\" --exclude \"tags/**\" --exclude \"docs/**\"",
"fix-all": "yarn fmt --write && yarn lint --fix",
"test-all": "yarn spell && yarn knip && yarn fmt && yarn lint",
"release": "yarn release-it"
},
"devDependencies": {
Expand All @@ -30,10 +34,13 @@
"@ton/core": "^0.53.0",
"@ton/crypto": "^3.2.0",
"@ton/ton": "^13.9.0",
"@types/babel__generator": "^7.6.8",
"@types/babel__traverse": "^7.20.4",
"@types/node": "^20.2.5",
"prettier": "^3.2.5",
"@typescript-eslint/eslint-plugin": "^7.0.4",
"@typescript-eslint/parser": "^7.0.4",
"cspell": "^8.14.4",
"eslint": "^8.57.0",
"knip": "^5.30.5",
"prettier": "^3.3.3",
"release-it": "^17.6.0",
"typescript": "^4.9.5"
},
Expand All @@ -44,14 +51,7 @@
"@ton/ton": ">=13.4.1"
},
"dependencies": {
"@babel/core": "^7.23.6",
"@babel/generator": "^7.23.6",
"@babel/parser": "^7.23.6",
"@babel/preset-typescript": "^7.23.3",
"@babel/traverse": "^7.23.6",
"@babel/types": "^7.23.6",
"@nowarp/misti": "^0.3.0",
"arg": "^5.0.2"
"@nowarp/misti": "^0.3.1"
},
"prettier": {
"semi": true,
Expand All @@ -66,7 +66,7 @@
},
"release-it": {
"hooks": {
"before:release": "yarn clean && yarn build",
"before:release": "yarn clean && yarn test-all && yarn build",
"after:bump": "yarn build"
},
"github": {
Expand Down
4 changes: 3 additions & 1 deletion src/misti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ export const misti: Runner = async (args: Args, ui: UIProvider) => {
ui.write("✅ No warnings found");
}
} else {
ui.write(`❌ Misti found ${result.warningsFound} warnings:\n${result.output}`);
ui.write(
`❌ Misti found ${result.warningsFound} warnings:\n${result.output}`,
);
}
};
Loading

0 comments on commit 23fcd54

Please sign in to comment.