mirror of
https://github.com/scratchfoundation/scratch-render-fonts.git
synced 2025-06-29 23:30:25 -04:00
style: configure eslint
This commit is contained in:
parent
248d0a6d29
commit
a18829e7d2
7 changed files with 68 additions and 42 deletions
11
.editorconfig
Normal file
11
.editorconfig
Normal file
|
@ -0,0 +1,11 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
2
.eslintignore
Normal file
2
.eslintignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
dist/*
|
||||
node_modules/*
|
3
.eslintrc.js
Normal file
3
.eslintrc.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
extends: ['scratch', 'scratch/node', 'scratch/es6']
|
||||
};
|
4
.github/workflows/ci-cd.yml
vendored
4
.github/workflows/ci-cd.yml
vendored
|
@ -35,7 +35,9 @@ jobs:
|
|||
GitHub head ref: ${{ github.head_ref }}
|
||||
EOF
|
||||
- name: Setup
|
||||
run: npm ci --legacy-peer-deps
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Setup Deploy
|
||||
run: |
|
||||
echo "export NPM_TAG=latest" >> $GITHUB_ENV
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"scripts": {
|
||||
"build": "npm run clean && webpack --progress --bail",
|
||||
"clean": "rimraf ./dist",
|
||||
"lint": "eslint .",
|
||||
"test": "npm run build",
|
||||
"watch": "webpack --progress --watch"
|
||||
},
|
||||
|
|
7
src/.eslintrc.js
Normal file
7
src/.eslintrc.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ['scratch', 'scratch/es6'],
|
||||
env: {
|
||||
browser: true
|
||||
}
|
||||
};
|
|
@ -36,6 +36,6 @@ const getFonts = function () {
|
|||
}
|
||||
|
||||
return FONTS;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = getFonts;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue