Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: integrate dev tools and fix crusial errors and warnings #295

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# disabled for all by default
*
!.*.js

# enabled for spotify only
!/spotify/
!/spotify/**/
!/spotify/**/*

# add more exceptions to enable for other plugins
# ...

node_modules/
30 changes: 30 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false
},
"env": {
"es6": true,
"node": true
},
"rules": {
"camelcase": [
"warn",
{ "properties": "never", "ignoreDestructuring": true, "ignoreImports": true, "ignoreGlobals": true }
],
"eqeqeq": "warn",
"new-cap": "warn",
"no-async-promise-executor": "off",
"no-console": "off",
"no-constant-condition": "off",
"no-path-concat": "warn",
"no-prototype-builtins": "off",
"no-redeclare": "warn",
"no-use-before-define": "off",
"no-sequences": "error",
"no-unused-vars": "warn",
"no-var": "warn",
"strict": "off"
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install.sh text=auto eol=lf
uninstall.sh text=auto eol=lf
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint

on:
pull_request_target:
branches:
- master

env:
NODE_VERSION: 16

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}

- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.idea/
node_modules/

.DS_Store
*node_modules*
.gitignore
/.idea/*
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.js": "eslint --fix",
"*.{json,md}": "prettier --write"
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# disabled for all by default
*
!.*.*

# enabled for spotify only
!/spotify/
!/spotify/**/
!/spotify/**/*

# add more exceptions to enable for other plugins
# ...

# those should be the last entries to ignore them again after exceptions
node_modules/
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"endOfLine": "auto",
"printWidth": 120,
"singleQuote": true
}
Loading