Skip to content

Commit 9d5e819

Browse files
authored
Merge pull request #19395 from mozilla/add-liscense-headers
chore(settings): Add eslint to check for missing header comments
2 parents 01e0a5d + 4ebf93c commit 9d5e819

37 files changed

Lines changed: 160 additions & 25 deletions

File tree

packages/fxa-settings/.eslintrc.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"root": true,
33
"extends": ["react-app", "react-app/jest"],
4+
"plugins": ["header"],
45
"rules": {
56
"import/export": "error",
67
"import/named": "off",
@@ -18,7 +19,11 @@
1819
"testing-library/render-result-naming-convention": "off",
1920
"testing-library/prefer-screen-queries": "off",
2021
"testing-library/no-unnecessary-act": "off",
21-
"testing-library/no-container": "off"
22+
"testing-library/no-container": "off",
23+
"header/header": [
24+
2, "block",
25+
" This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. "
26+
]
2227
},
2328
"overrides": [
2429
{
@@ -29,5 +34,5 @@
2934
}
3035
}
3136
],
32-
"ignorePatterns": ["build/", "scripts/build.js"]
37+
"ignorePatterns": ["build/", "scripts/build.js", "dist/"]
3338
}

packages/fxa-settings/.storybook/design-guide/Copiable.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React, { useState } from 'react';
26

37
const Copiable = ({ value, children }) => {

packages/fxa-settings/.storybook/design-guide/Header.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26
import LinkExternal from 'fxa-react/components/LinkExternal';
37

packages/fxa-settings/.storybook/design-guide/Page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26
import Header from './Header';
37
import AppLocalizationProvider from 'fxa-react/lib/AppLocalizationProvider';

packages/fxa-settings/.storybook/design-guide/Snippet.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26

37
const Snippet = ({ moarClasses = '', children }) => (

packages/fxa-settings/.storybook/design-guide/main.stories.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26
import { storiesOf } from '@storybook/react';
37
import tailwindConfig from '../../../fxa-react/configs/tailwind';

packages/fxa-settings/.storybook/design-guide/pages/Breakpoints.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26
import Page from '../Page';
37
import Copiable from '../Copiable';

packages/fxa-settings/.storybook/design-guide/pages/Colors.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26
import Page from '../Page';
37
import Copiable from '../Copiable';

packages/fxa-settings/.storybook/design-guide/pages/Introduction.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26
import Page from '../Page';
37
import LinkExternal from 'fxa-react/components/LinkExternal';

packages/fxa-settings/.storybook/design-guide/pages/Spacing.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
import React from 'react';
26
import Page from '../Page';
37
import Copiable from '../Copiable';

0 commit comments

Comments
 (0)