Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add eslint & prettier, and re-format JS #17026

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

Merged
merged 3 commits into from
Apr 10, 2020
Merged
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@ lib/z.lib
#########################

jquery-ui-*/
lib/matplotlib/backends/web_backend/node_modules/
lib/matplotlib/backends/web_backend/package-lock.json
21 changes: 21 additions & 0 deletions lib/matplotlib/backends/web_backend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
ignorePatterns: ["jquery-ui-*/", "node_modules/"],
env: {
browser: true,
jquery: true,
},
extends: ["eslint:recommended", "prettier"],
globals: {
IPython: "readonly",
MozWebSocket: "readonly",
},
rules: {
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
},
],
},
};
7 changes: 7 additions & 0 deletions lib/matplotlib/backends/web_backend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/

# Vendored dependencies
css/boilerplate.css
css/fbm.css
css/page.css
jquery-ui-*/
11 changes: 11 additions & 0 deletions lib/matplotlib/backends/web_backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"overrides": [
{
"files": "js/**/*.js",
"options": {
"singleQuote": true,
"tabWidth": 4,
}
}
]
}
Loading