Skip to content

Commit

Permalink
style: force formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
songkg7 committed Dec 12, 2024
1 parent 70ad5a2 commit 4e2aa20
Show file tree
Hide file tree
Showing 44 changed files with 685 additions and 488 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
1 change: 0 additions & 1 deletion .github/auto_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ reviewers:
# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0

# A list of assignees, overrides reviewers if set
# assignees:
# - assigneeA
Expand Down
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
---
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "monthly"
interval: 'monthly'
labels:
- "dependencies"
- 'dependencies'
groups:
dev-dependencies:
patterns:
- "@type*"
- '@type*'
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ What kind of change does this PR introduce?
- [ ] Other... Please describe:

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
<!-- If this is a PR that resolves the issue, please include the `close` or `resolve` keyword -->

Issue Number: N/A


## What is the new behavior?


## Does this PR introduce a breaking change?

- [ ] Yes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/auto-assign-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]

14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: CI

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
branches: [ "main" ]
branches: ['main']

permissions: { }
permissions: {}

jobs:
run:
Expand All @@ -26,9 +26,9 @@ jobs:
- uses: actions/checkout@v4
- uses: codecov/codecov-action@v4
with:
# fail_ci_if_error: true # optional (default = false)
# files: ./coverage1.xml,./coverage2.xml # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
# fail_ci_if_error: true # optional (default = false)
# files: ./coverage1.xml,./coverage2.xml # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
15 changes: 7 additions & 8 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Lint Code Base

on:
push:
branches-ignore: [ main ]
branches-ignore: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions: { }
permissions: {}

jobs:
build:
Expand All @@ -29,11 +29,10 @@ jobs:
fetch-depth: 0

- name: Super-linter
uses: super-linter/[email protected] # x-release-please-version
uses: super-linter/[email protected] # x-release-please-version
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_JAVASCRIPT_STANDARD: "false"
VALIDATE_TYPESCRIPT_STANDARD: "false"
VALIDATE_CHECKOV: "false"

VALIDATE_JAVASCRIPT_STANDARD: 'false'
VALIDATE_TYPESCRIPT_STANDARD: 'false'
VALIDATE_CHECKOV: 'false'
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ This project is published under [MIT](https://choosealicense.com/licenses/mit/)
If you ever want to buy me a coffee, don't hesitate.

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/V7V8KX38Q)

70 changes: 35 additions & 35 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";
import esbuild from 'esbuild';
import process from 'process';
import builtins from 'builtin-modules';

const banner =
`/*
const banner = `/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
`;

const prod = (process.argv[2] === "production");
const prod = process.argv[2] === 'production';

const context = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ["src/main.ts"],
bundle: true,
external: [
"obsidian",
"electron",
"@codemirror/autocomplete",
"@codemirror/collab",
"@codemirror/commands",
"@codemirror/language",
"@codemirror/lint",
"@codemirror/search",
"@codemirror/state",
"@codemirror/view",
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins],
format: "cjs",
target: "es2018",
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
outfile: "main.js",
banner: {
js: banner,
},
entryPoints: ['src/main.ts'],
bundle: true,
external: [
'obsidian',
'electron',
'@codemirror/autocomplete',
'@codemirror/collab',
'@codemirror/commands',
'@codemirror/language',
'@codemirror/lint',
'@codemirror/search',
'@codemirror/state',
'@codemirror/view',
'@lezer/common',
'@lezer/highlight',
'@lezer/lr',
...builtins,
],
format: 'cjs',
target: 'es2018',
logLevel: 'info',
sourcemap: prod ? false : 'inline',
treeShaking: true,
outfile: 'main.js',
});

if (prod) {
await context.rebuild();
process.exit(0);
await context.rebuild();
process.exit(0);
} else {
await context.watch();
await context.watch();
}
82 changes: 44 additions & 38 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,56 +1,62 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [{
files: ["**/*.ts", "**/*.tsx"],
ignores: ["**/node_modules/", "**/main.js"],
}, ...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
), {
export default [
{
files: ['**/*.ts', '**/*.tsx'],
ignores: ['**/node_modules/', '**/main.js'],
},
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
'@typescript-eslint': typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 2018,
sourceType: "module",
parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module',

parserOptions: {
project: "./tsconfig.json",
},
parserOptions: {
project: './tsconfig.json',
},
},

rules: {
"no-unused-vars": "off",
'no-unused-vars': 'off',

"@typescript-eslint/no-unused-vars": ["error", {
args: "none",
}],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'none',
},
],

"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off",
semi: ["error", "always"],
'@typescript-eslint/ban-ts-comment': 'off',
'no-prototype-builtins': 'off',
'@typescript-eslint/no-empty-function': 'off',
semi: ['error', 'always'],
},
}];

},
];
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.+\\.ts?$': 'ts-jest'
'^.+\\.ts?$': 'ts-jest',
},
transformIgnorePatterns: ['<rootDir>/node_modules'],
moduleDirectories: ['node_modules', 'src'],
collectCoverage: true,
coverageReporters: ['text', 'cobertura']
coverageReporters: ['text', 'cobertura'],
};
20 changes: 10 additions & 10 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "o2",
"name": "O2",
"version": "2.1.0",
"minAppVersion": "0.15.0",
"description": "This is a plugin to make obsidian markdown syntax compatible with other markdown syntax.",
"author": "haril song",
"authorUrl": "https://github.com/songkg7",
"fundingUrl": "",
"isDesktopOnly": true
}
"id": "o2",
"name": "O2",
"version": "2.1.0",
"minAppVersion": "0.15.0",
"description": "This is a plugin to make obsidian markdown syntax compatible with other markdown syntax.",
"author": "haril song",
"authorUrl": "https://github.com/songkg7",
"fundingUrl": "",
"isDesktopOnly": true
}
Loading

0 comments on commit 4e2aa20

Please sign in to comment.