Skip to content

Commit

Permalink
Format JS code using prettier (#2287)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Jun 11, 2024
1 parent fcb106a commit 5c68ccc
Show file tree
Hide file tree
Showing 256 changed files with 17,217 additions and 28,963 deletions.
4 changes: 4 additions & 0 deletions js/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*]
indent_style = space
indent_size = 4
max_line_length = 120
4 changes: 0 additions & 4 deletions js/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
es5
lib
assets
gulp/bundle.js
bin/HttpServer.js
test/Ice/import/bundle.js
test/typescript/**/*.js
95 changes: 30 additions & 65 deletions js/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,26 @@ module.exports = {
"browser": true,
"es6": true,
"node": true,
"worker": true
"worker": true,
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 8
"ecmaVersion": 8,
},
"rules": {
"accessor-pairs": "error",
"array-bracket-newline": "off",
"array-bracket-spacing": [
"error",
"never"
],
"array-bracket-spacing": ["error", "never"],
"array-callback-return": "off",
"array-element-newline": "off",
"arrow-body-style": "error",
"arrow-parens": [
"error",
"as-needed"
],
"arrow-parens": ["error", "as-needed"],
"arrow-spacing": [
"error",
{
"after": true,
"before": true
}
"before": true,
},
],
"block-scoped-var": "error",
"block-spacing": "error",
Expand All @@ -42,13 +36,10 @@ module.exports = {
"error",
{
"after": true,
"before": false
}
],
"comma-style": [
"error",
"last"
"before": false,
},
],
"comma-style": ["error", "last"],
"complexity": "off",
"computed-property-spacing": "error",
"consistent-return": "off",
Expand All @@ -59,8 +50,8 @@ module.exports = {
"dot-notation": [
"error",
{
"allowKeywords": true
}
"allowKeywords": true,
},
],
"eol-last": "error",
"eqeqeq": "off",
Expand Down Expand Up @@ -88,10 +79,7 @@ module.exports = {
"linebreak-style": "off",
"lines-around-comment": "error",
"lines-around-directive": "error",
"lines-between-class-members": [
"error",
"always"
],
"lines-between-class-members": ["error", "always"],
"max-depth": "off",
"max-len": "off",
"max-lines": "off",
Expand All @@ -116,9 +104,10 @@ module.exports = {
"no-console": "off",
"no-continue": "off",
"no-constant-condition": [
"error",{
"checkLoops": false
}
"error",
{
"checkLoops": false,
},
],
"no-div-regex": "error",
"no-duplicate-imports": "error",
Expand All @@ -127,8 +116,8 @@ module.exports = {
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
"allowEmptyCatch": true,
},
],
"no-eq-null": "error",
"no-eval": "error",
Expand Down Expand Up @@ -198,11 +187,11 @@ module.exports = {
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"no-use-before-define": "off",
"no-unused-vars":[
"no-unused-vars": [
"error",
{
"args" : "none"
}
"args": "none",
},
],
"no-useless-call": "error",
"no-useless-computed-key": "error",
Expand All @@ -224,10 +213,7 @@ module.exports = {
"one-var": "off",
"one-var-declaration-per-line": "error",
"operator-assignment": "error",
"operator-linebreak": [
"error",
"after"
],
"operator-linebreak": ["error", "after"],
"padded-blocks": "off",
"padding-line-between-statements": "error",
"prefer-arrow-callback": "error",
Expand All @@ -239,55 +225,34 @@ module.exports = {
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "off",
"quote-props": [
"error",
"as-needed"
],
"quotes": [
"off",
"double"
],
"quote-props": ["error", "as-needed"],
"quotes": ["off", "double"],
"radix": "off",
"require-await": "error",
"require-jsdoc": "off",
"rest-spread-spacing": "error",
"semi": "error",
"semi-spacing": "error",
"semi-style": [
"error",
"last"
],
"semi-style": ["error", "last"],
"sort-imports": "error",
"sort-keys": "off",
"sort-vars": "error",
"space-before-blocks": "error",
"space-before-function-paren": "off",
"space-in-parens": [
"error",
"never"
],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": [
"error",
"always"
],
"spaced-comment": ["error", "always"],
"switch-colon-spacing": "error",
"symbol-description": "error",
"template-curly-spacing": "error",
"template-tag-spacing": "error",
"unicode-bom": [
"error",
"never"
],
"unicode-bom": ["error", "never"],
"valid-jsdoc": "off",
"vars-on-top": "error",
"wrap-iife": "error",
"wrap-regex": "error",
"yield-star-spacing": "error",
"yoda": [
"error",
"never"
]
}
"yoda": ["error", "never"],
},
};
11 changes: 0 additions & 11 deletions js/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ LICENSE

src/index.d.ts

#
# Babel generated files
#
src/es5/Glacier2
src/es5/Ice
src/es5/IceGrid
src/es5/IceMX
src/es5/IceSSL
src/es5/IceStorm
test/es5

#
# Typescript test generated files
#
Expand Down
5 changes: 5 additions & 0 deletions js/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

**/*.ice
**/*.md
assets/*
package-lock.json
4 changes: 4 additions & 0 deletions js/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
overrides:
- files: [".eslintrc.js", "*.json"]
options:
quoteProps: preserve
Loading

0 comments on commit 5c68ccc

Please sign in to comment.