daml/navigator/frontend/.eslintrc.js
Gary Verhaegen a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00

61 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
module.exports = {
"env": {
"browser": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
},
"plugins": [
"react",
"@typescript-eslint",
],
"rules": {
"react/display-name": "off",
// Triggers falsely on FCs if you dont annotate the argument as well, see
// https://github.com/yannickcr/eslint-plugin-react/issues/2353
"react/prop-types": "off",
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
// While {} is problematic in a lot of cases, using it as the
// props types is fine and this is very common in React, see
// https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-675156492
"{}": false,
},
},
],
// Warning on redundant type annotations seems silly.
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{
"allowArgumentsExplicitlyTypedAsAny": true,
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_",
}
],
},
"settings": {
"react": {
"version": "detect",
},
},
};