Skip to content

Commit

Permalink
Merge pull request ton-community#462 from liketurbo/add-eslint-linting
Browse files Browse the repository at this point in the history
Add eslint linting
  • Loading branch information
reveloper authored Jan 24, 2024
2 parents 5bdc660 + 628e6ef commit 52a0e34
Show file tree
Hide file tree
Showing 7 changed files with 709 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./.docusaurus
./build
./node_modules
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// .eslintrc.js example
module.exports = {
env: {
browser: true,
es2021: true
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module"
},
rules: {
indent: ["error", 2]
}
}
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint

on: pull_request

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci # or yarn install
- uses: sibiraj-s/action-eslint@v3
with:
token: ${{ secrets.GITHUB_TOKEN }} # optional
ignore-path: .eslintignore
extensions: 'js,jsx,ts,tsx'
annotations: true
Loading

0 comments on commit 52a0e34

Please sign in to comment.