Skip to content

Commit eb55252

Browse files
author
Heiner Pöpping
committed
Update eslint config in template
1 parent 2909673 commit eb55252

File tree

8 files changed

+7
-14
lines changed

8 files changed

+7
-14
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,6 @@ async function createChaynsApp({
246246
projectName,
247247
templateDir: path.join(` ${dirname} `.trim(), templateSharedPath),
248248
});
249-
await copyFile(
250-
getTemplatePath(`../templates/api-v5/shared/ts/.eslintrc`),
251-
path.join(destination, '.eslintrc'),
252-
);
253249
if (tobitInternal) {
254250
const templateInternalPath = `../templates/api-v5/internal/${extension}/src`;
255251
await copyTemplate({
@@ -304,6 +300,10 @@ async function createChaynsApp({
304300
getTemplatePath(`../templates/api-v5/shared/.env.development.local`),
305301
path.join(destination, '.env.development.local'),
306302
);
303+
await copyFile(
304+
getTemplatePath('../templates/shared/eslint.config.mjs'),
305+
path.join(destination, 'eslint.config.mjs'),
306+
);
307307

308308
if (!fs.existsSync(path.join(destination, '/src/constants'))) {
309309
fs.mkdirSync(path.join(destination, '/src/constants'));

src/util/createAppWrapper.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ export const createAppWrapper = ({
6969
if (moduleFederation) {
7070
lines.push(`${' '.repeat(indent)}<div className="${packageNameUnderscore}">`);
7171
indent += 4;
72-
lines.push(
73-
`${' '.repeat(indent)}{/* eslint-disable-next-line react/jsx-props-no-spreading */}`,
74-
);
7572
}
7673

7774
lines.push(`${' '.repeat(indent)}<ChaynsProvider${moduleFederation ? ' {...props}' : ''}>`);

src/util/packageJson.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ const createBaseConfig = (name, description) => ({
3333
tabWidth: 4,
3434
printWidth: 100,
3535
},
36-
eslintConfig: {
37-
extends: '@chayns-toolkit',
38-
},
3936
dependencies: {},
4037
devDependencies: {},
4138
});

templates/api-v5/page-module-redux/src/components/AppWrapper.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import store from '../redux-modules';
77

88
const AppWrapper = (props) => (
99
<div className="{{ package-name-underscore }}">
10-
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
1110
<ChaynsProvider {...props}>
1211
<Provider store={store}>
1312
<PageProvider>

templates/api-v5/page-module/src/components/AppWrapper.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import App from './App';
55

66
const AppWrapper = (props) => (
77
<div className="{{ package-name-underscore }}">
8-
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
98
<ChaynsProvider {...props}>
109
<PageProvider>
1110
<App />

templates/api-v5/page-ts-module-redux/src/components/AppWrapper.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import store from '../redux-modules';
77

88
const AppWrapper = (props: ComponentPropsWithoutRef<typeof ChaynsProvider>) => (
99
<div className="{{ package-name-underscore }}">
10-
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
1110
<ChaynsProvider {...props}>
1211
<Provider store={store}>
1312
<PageProvider>

templates/api-v5/page-ts-module/src/components/AppWrapper.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import App from './App';
55

66
const AppWrapper = (props: ComponentPropsWithoutRef<typeof ChaynsProvider>) => (
77
<div className="{{ package-name-underscore }}">
8-
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
98
<ChaynsProvider {...props}>
109
<PageProvider>
1110
<App />

templates/shared/eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from '@chayns-toolkit/eslint-config';
2+
3+
export default config;

0 commit comments

Comments
 (0)