-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fb860e
commit 636269a
Showing
27 changed files
with
1,440 additions
and
2,691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,38 @@ | ||
const {getESLintConfig, deepMerge} = require('ocular-dev-tools'); | ||
const {getESLintConfig} = require('ocular-dev-tools/configuration'); | ||
|
||
const defaultConfig = getESLintConfig({react: '16.8.2'}); | ||
module.exports = getESLintConfig({ | ||
react: '16.8.2', | ||
overrides: { | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
ecmaVersion: 2020 | ||
}, | ||
|
||
// Make any changes to default config here | ||
const config = deepMerge(defaultConfig, { | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
ecmaVersion: 2020 | ||
}, | ||
rules: { | ||
'max-depth': ['warn', 4], | ||
complexity: ['warn'], | ||
'max-statements': ['warn'], | ||
'callback-return': 0 | ||
}, | ||
|
||
env: { | ||
es2020: true | ||
// browser: true, | ||
// node: true | ||
}, | ||
|
||
rules: { | ||
camelcase: 0, | ||
indent: 0, | ||
'import/no-unresolved': 0, | ||
'import/no-extraneous-dependencies': 0, // ['warn'], | ||
'no-console': 1, | ||
'no-continue': ['warn'], | ||
'callback-return': 0, | ||
'max-depth': ['warn', 4], | ||
complexity: ['warn'], | ||
'max-statements': ['warn'], | ||
'default-case': ['warn'], | ||
'no-eq-null': ['warn'], | ||
eqeqeq: ['warn'], | ||
radix: 0 | ||
// 'accessor-pairs': ['error', {getWithoutSet: false, setWithoutGet: false}] | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ['**/*.ts', '**/*.tsx', '**/*.d.ts'], | ||
rules: { | ||
indent: 0, | ||
quotes: ['error', 'single', {avoidEscape: true}], | ||
// For parquet module | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
'@typescript-eslint/no-non-null-asserted-optional-chain': 0, | ||
// Gradually enable | ||
'@typescript-eslint/ban-ts-comment': 0, | ||
'@typescript-eslint/ban-types': 0, | ||
'@typescript-eslint/no-unsafe-member-access': 0, | ||
'@typescript-eslint/no-unsafe-assignment': 0, | ||
'@typescript-eslint/no-var-requires': 0, | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{vars: 'all', args: 'none', ignoreRestSiblings: false} | ||
], | ||
// We still have some issues with import resolution | ||
'import/named': 0, | ||
// Warn instead of error | ||
// 'max-params': ['warn'], | ||
// 'no-undef': ['warn'], | ||
// camelcase: ['warn'], | ||
// '@typescript-eslint/no-floating-promises': ['warn'], | ||
// '@typescript-eslint/await-thenable': ['warn'], | ||
// '@typescript-eslint/no-misused-promises': ['warn'], | ||
'@typescript-eslint/no-empty-function': ['warn', {allow: ['arrowFunctions']}], | ||
// We use function hoisting | ||
'@typescript-eslint/no-use-before-define': 0, | ||
// We always want explicit typing, e.g `field: string = ''` | ||
'@typescript-eslint/no-inferrable-types': 0, | ||
'@typescript-eslint/restrict-template-expressions': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/require-await': 0, | ||
'@typescript-eslint/no-unsafe-return': 0, | ||
'@typescript-eslint/no-unsafe-call': 0, | ||
'@typescript-eslint/no-empty-interface': 0, | ||
'@typescript-eslint/restrict-plus-operands': 0 | ||
overrides: [ | ||
{ | ||
files: ['**/*.ts', '**/*.tsx', '**/*.d.ts'], | ||
rules: { | ||
// Gradually enable | ||
'@typescript-eslint/ban-ts-comment': 0, | ||
'@typescript-eslint/ban-types': 0, | ||
'@typescript-eslint/no-unsafe-member-access': 0, | ||
'@typescript-eslint/no-unsafe-assignment': 0, | ||
'import/named': 0, | ||
'@typescript-eslint/no-empty-function': ['warn', {allow: ['arrowFunctions']}], | ||
'@typescript-eslint/restrict-template-expressions': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/no-unsafe-return': 0, | ||
'@typescript-eslint/no-unsafe-call': 0, | ||
'@typescript-eslint/restrict-plus-operands': 0 | ||
} | ||
} | ||
} | ||
], | ||
|
||
settings: { | ||
// Ensure eslint finds typescript files | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx'] | ||
} | ||
} | ||
] | ||
} | ||
}); | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
env: | ||
MapboxAccessToken: ${{ secrets.MAPBOX_ACCESS_TOKEN_CI }} | ||
VITE_MAPBOX_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN_CI }} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
node-version: '16.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
const {getBabelConfig} = require('ocular-dev-tools'); | ||
const {getBabelConfig} = require('ocular-dev-tools/configuration'); | ||
|
||
module.exports = api => { | ||
let config = getBabelConfig(api, {react: true}); | ||
|
||
return config; | ||
}; | ||
module.exports = getBabelConfig({ | ||
react: true, | ||
overrides: {} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
/* global window */ | ||
const test = require('tape'); | ||
const {_enableDOMLogging: enableDOMLogging} = require('@probe.gl/test-utils'); | ||
import test from 'tape'; | ||
|
||
let failed = false; | ||
test.onFinish(window.browserTestDriver_finish); | ||
test.onFailure(() => { | ||
failed = true; | ||
window.browserTestDriver_fail(); | ||
}); | ||
test.onFailure(window.browserTestDriver_fail); | ||
|
||
// tap-browser-color alternative | ||
enableDOMLogging({ | ||
getStyle: message => ({ | ||
background: failed ? '#F28E82' : '#8ECA6C', | ||
position: 'absolute', | ||
top: '500px', | ||
width: '100%' | ||
}) | ||
}); | ||
|
||
require('./render'); | ||
import './render'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as ReactMapGL from 'react-map-gl'; | ||
|
||
console.log(ReactMapGL); // eslint-disable-line |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import {Map} from 'react-map-gl'; | ||
|
||
console.log(Map); // eslint-disable-line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.