Skip to content

Commit

Permalink
chore: add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdancondorachi committed Jan 13, 2025
1 parent 8bb3911 commit b0fe129
Show file tree
Hide file tree
Showing 11 changed files with 304 additions and 227 deletions.
14 changes: 3 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
root = true

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

[*.php]
indent_size = 2

[*.md,*.txt]
trim_trailing_whitespace = false
insert_final_newline = false

[composer.json]
indent_size = 2
insert_final_newline = true
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.gitignore export-ignore

# Development files
/.vscode
/src/panel export-ignore
.editorconfig export-ignore
.eslint.config.mjs
package.json export-ignore
4 changes: 0 additions & 4 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,18 @@ assignees: 'bogdancondorachi'

## Description


## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. See error


## Screenshots


## Environment:
- **Browser:** [e.g. Chrome, Firefox, Safari]
- **Plugin Version:** [e.g. 2.4.0]
- **Kirby Version:** [e.g. 4.4.1, 4.3.8]


## Additional Context
- **Field Blueprint:**
- **Field Content:**
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ assignees: 'bogdancondorachi'

## Summary


## Why is this feature needed?
6 changes: 3 additions & 3 deletions .github/workflows/update-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update Grammars and Themes

on:
schedule:
- cron: '0 23 * * 0' # Runs at 11:00 PM (UTC) every Sunday
- cron: "0 23 * * 0" # Runs at 11:00 PM (UTC) every Sunday
workflow_dispatch: # Allows manual trigger

jobs:
Expand All @@ -18,13 +18,13 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: "18"

# Step 3: Set up PHP and Composer
- name: Set up PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: "8.2"
tools: composer

# Step 4: Check for updates to Shiki repository
Expand Down
37 changes: 37 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
// 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",
"typescript",
"vue",
"markdown",
"json",
"yaml",
"css",
"scss"
]
}
Loading

0 comments on commit b0fe129

Please sign in to comment.