Skip to content

Commit 416128b

Browse files
committed
chore: add eslint license header plugin
1 parent 94d807d commit 416128b

4 files changed

Lines changed: 49 additions & 4 deletions

File tree

.eslintrc.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,19 @@
3737
"presets": ["@babel/preset-react"]
3838
}
3939
},
40-
"plugins": ["@typescript-eslint", "react", "prettier"],
40+
"plugins": ["@typescript-eslint", "react", "prettier", "license-header"],
4141
"rules": {
4242
"react/prop-types": "off",
4343
"require-jsdoc": "off",
4444
"no-async-promise-executor": "off",
4545
"@typescript-eslint/no-explicit-any": "off", // temporary until TS refactor is complete
4646
"@typescript-eslint/no-unused-vars": "off", // temporary until TS refactor is complete
4747
"@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
48+
"@typescript-eslint/no-unused-expressions": "off", // prevents error on test "expect" expressions
49+
"license-header/header": [
50+
"error",
51+
"./LICENSE_header.txt"
52+
]
4953
},
5054
"settings": {
5155
"react": {

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+
*/

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"test-coverage": "nyc npm run test",
2020
"test-coverage-ci": "nyc --reporter=lcovonly --reporter=text npm run test",
2121
"prepare": "node ./scripts/prepare.js",
22-
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx,json}\" \"test/**/*.{js,jsx,ts,tsx,json}\"",
23-
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx,json}\" \"test/**/*.{js,jsx,ts,tsx,json}\"",
22+
"lint": "eslint \"{src,test,tests}/**/*.{js,jsx,ts,tsx,json}\"",
23+
"lint:fix": "eslint --fix \"{src,test,tests}/**/*.{js,jsx,ts,tsx,json}\"",
2424
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,css,md,json,scss} test/**/*.{js,jsx,ts,tsx,json} packages/git-proxy-cli/test/**/*.{js,jsx,ts,tsx,json} packages/git-proxy-cli/index.js --config ./.prettierrc",
2525
"gen-schema-doc": "node ./scripts/doc-schema.js",
2626
"cypress:run": "cypress run"
@@ -109,6 +109,7 @@
109109
"eslint-config-google": "^0.14.0",
110110
"eslint-config-prettier": "^10.1.8",
111111
"eslint-plugin-json": "^3.1.0",
112+
"eslint-plugin-license-header": "^0.8.0",
112113
"eslint-plugin-prettier": "^5.5.3",
113114
"eslint-plugin-react": "^7.37.5",
114115
"eslint-plugin-standard": "^5.0.0",

0 commit comments

Comments
 (0)