Skip to content

Commit de8d95e

Browse files
coopernetessam-holmes2
authored andcommitted
chore: add eslint license header plugin
cherry picking changes as requested for PR 1017
1 parent 375bd13 commit de8d95e

4 files changed

Lines changed: 2953 additions & 2736 deletions

File tree

.eslintrc.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"node": true,
5+
"browser": true,
6+
"commonjs": true,
7+
"es2021": true,
8+
"mocha": true
9+
},
10+
"extends": [
11+
"eslint:recommended",
12+
"plugin:@typescript-eslint/recommended",
13+
"plugin:react/recommended",
14+
"google",
15+
"prettier",
16+
"plugin:json/recommended"
17+
],
18+
"overrides": [
19+
{
20+
"files": ["test/**/*.js", "**/*.json"],
21+
"parser": "espree",
22+
"rules": {
23+
"@typescript-eslint/no-unused-expressions": "off"
24+
}
25+
}
26+
],
27+
"parserOptions": {
28+
"project": "./tsconfig.json",
29+
"requireConfigFile": false,
30+
"ecmaVersion": 12,
31+
"sourceType": "module",
32+
"ecmaFeatures": {
33+
"jsx": true,
34+
"modules": true
35+
},
36+
"babelOptions": {
37+
"presets": ["@babel/preset-react"]
38+
}
39+
},
40+
"plugins": ["@typescript-eslint", "react", "prettier", "license-header"],
41+
"rules": {
42+
"react/prop-types": "off",
43+
"require-jsdoc": "off",
44+
"no-async-promise-executor": "off",
45+
"@typescript-eslint/no-explicit-any": "off", // temporary until TS refactor is complete
46+
"@typescript-eslint/no-unused-vars": "off", // temporary until TS refactor is complete
47+
"@typescript-eslint/no-require-imports": "off", // prevents error on old "require" imports
48+
"@typescript-eslint/no-unused-expressions": "off", // prevents error on test "expect" expressions
49+
"license-header/header": [
50+
"error",
51+
"./LICENSE_header.txt"
52+
]
53+
},
54+
"settings": {
55+
"react": {
56+
"version": "detect"
57+
}
58+
}
59+
}

LICENSE_header.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* @license
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*/

0 commit comments

Comments
 (0)