Skip to content

Commit

Permalink
Simplify config, only override warnings for typescript files
Browse files Browse the repository at this point in the history
- more fixes
  • Loading branch information
ljowen committed Dec 19, 2023
1 parent c461a9e commit 175eaa5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 59 deletions.
56 changes: 2 additions & 54 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -108,60 +108,7 @@
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true,
"legacyDecorators": true
},
"ecmaVersion": 2019,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
"react/jsx-boolean-value": ["error", "never", { "always": [] }],
"react/jsx-closing-bracket-location": ["error", "line-aligned"],
"react/jsx-closing-tag-location": "error",
"react/jsx-curly-spacing": [
"error",
"never",
{ "allowMultiline": true }
],
"react/no-arrow-function-lifecycle": "error",
"react/no-invalid-html-attribute": "error",
"react/jsx-no-useless-fragment": "error",
"react/jsx-no-constructed-context-values": "error",
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-no-duplicate-props": ["error", { "ignoreCase": true }],
"react/jsx-pascal-case": [
"error",
{
"allowAllCaps": true,
"ignore": []
}
],
"react/no-danger": "warn",
"react/no-did-update-set-state": "error",
"react/no-will-update-set-state": "error",
"react/self-closing-comp": "error",
"react/jsx-no-undef": ["error", { "allowGlobals": true }],
"react/prop-types": "off",

"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-this-alias": "off",

// @TODO: revise these rules
"@typescript-eslint/no-unused-vars": [
"warn",
Expand All @@ -174,7 +121,8 @@
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-loss-of-precision": "warn",
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
"react-hooks/exhaustive-deps": "warn"
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "warn"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ gulp.task("lint", function (done) {
"--ignore-pattern",
"lib/ThirdParty",
"--max-warnings",
"308" // TODO: Bring this back to 0
"473" // TODO: Bring this back to 0
]);

done();
Expand Down
7 changes: 3 additions & 4 deletions lib/ModelMixins/ClippingMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,13 @@ function zoomToDataSourceWithTimeout(
// Create a promise that waits for the dataSource to be added to map or
// timeout to complete whichever happens first
return new Promise<void>((resolve, reject) => {
let removeListener = renderedDataSources.dataSourceAdded.addEventListener(
(_, added) => {
const removeListener =
renderedDataSources.dataSourceAdded.addEventListener((_, added) => {
if (added === dataSource) {
removeListener();
resolve(cesium.doZoomTo(dataSource));
}
}
);
});
runLater(removeListener, timeoutMilliseconds).then(reject);
});
}
Expand Down

0 comments on commit 175eaa5

Please sign in to comment.