Skip to content

Commit

Permalink
Migrate eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornharrtell committed May 9, 2024
1 parent 2f3599d commit a387d1e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 36 deletions.
34 changes: 0 additions & 34 deletions .eslintrc.cjs

This file was deleted.

43 changes: 43 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import globals from 'globals'
import js from '@eslint/js'

export default [
js.configs.recommended,
{

languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
//...globals.browser,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
$: 'readonly',
mocha: 'readonly',
Mocha: 'readonly',
describe: 'readonly',
it: 'readonly',
chai: 'readonly',
},
},
rules: {
quotes: ['error', 'single'],
indent: ['error', 2],
semi: ['error', 'never'],
curly: ['error', 'multi', 'consistent'],
'space-before-function-paren': ['error', 'never'],
'brace-style': ['error', '1tbs'],
'block-spacing': ['error', 'always'],
'object-curly-newline': ['error', { consistent: true }],
'prefer-const': 0,
'no-mixed-operators': 0,
'no-empty': 0,
'no-undef': 0,
'no-unreachable': 0,
'no-case-declarations': 0,
'no-unused-vars': 0,
'no-dupe-else-if': 0,
'no-constant-condition': 0,
},
},
]
2 changes: 1 addition & 1 deletion src/java/lang/Double.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ else
return new Long(high, low)
}

if (value !== value) { // eslint-disable-line
if (value !== value) {
// Handle NaNs (boiled down to only one distinct NaN).
low = 0 | 0
high = 0x7ff80000 // exponent: 11..11, significand: 10..00
Expand Down
2 changes: 1 addition & 1 deletion src/org/locationtech/jts/io/OL3Parser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-undef */

/**
* @module org/locationtech/jts/io/OL3Parser
Expand Down

0 comments on commit a387d1e

Please sign in to comment.