Skip to content

Commit

Permalink
Merge pull request plotly#7104 from birkskyum/biome
Browse files Browse the repository at this point in the history
WIP - Upgrade from ESLint to Biome
  • Loading branch information
archmoj authored Aug 17, 2024
2 parents 74dedd4 + 7a729ba commit f965e24
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 0 deletions.
114 changes: 114 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": { "enabled": true },
"files": {
"include": ["src", "lib", "test", "tasks", "build", "devtools"],
"ignore": [
"test/plot-schema.json",
"test/image/mocks",
"dist",
"stackgl_modules",
"node_modules",
"build",
"tasks/test_amdefine.js",
"tasks/test_requirejs.js",
"test/jasmine/assets/jquery-1.8.3.min.js"
]
},
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"complexity": {
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noWith": "error",
"useLiteralKeys": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "off",
"noInvalidConstructorSuper": "error",
"noInvalidUseBeforeDeclaration": "error",
"noNewSymbol": "error",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noSwitchDeclarations": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedLabels": "error",
"noUnusedVariables": "off",
"useIsNan": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"style": {
"useBlockStatements": "off",
"useSingleVarDeclarator": "off",
"noVar": "off"
},
"suspicious": {
"noAssignInExpressions": "off",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noConsoleLog": "off",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDoubleEquals": "off",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "off",
"noFallthroughSwitchClause": "off",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noPrototypeBuiltins": "off",
"noRedeclare": "off",
"noShadowRestrictedNames": "off",
"noUnsafeNegation": "error",
"useGetterReturn": "error",
"useValidTypeof": "error"
}
},
"ignore": [
"**/stackgl_modules",
"**/node_modules",
"**/dist",
"**/build",
"tasks/test_amdefine.js",
"tasks/test_requirejs.js",
"test/jasmine/assets/jquery-1.8.3.min.js"
]
},
"javascript": {
"globals": [
"Promise",
"Float32Array",
"Uint8ClampedArray",
"Int32Array",
"ArrayBuffer",
"Uint16Array",
"DataView",
"Float64Array",
"Int16Array",
"Uint8Array",
"Int8Array",
"Uint32Array"
]
}
}
237 changes: 237 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"@babel/core": "^7.25.2",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/preset-env": "^7.23.9",
"@biomejs/biome": "1.8.3",
"amdefine": "^1.0.1",
"babel-loader": "^9.1.3",
"browserify-transform-tools": "^1.7.0",
Expand Down

0 comments on commit f965e24

Please sign in to comment.