Skip to content

Commit

Permalink
chore: eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
azimgd committed Aug 15, 2022
1 parent 1d067a0 commit 3a476cb
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 41 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:metro-react-native-babel-preset'],
};
22 changes: 11 additions & 11 deletions example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ const path = require('path');
const pak = require('../package.json');

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module-resolver',
{
extensions: ['.js', '.jsx', '.json'],
alias: {
[pak.name]: path.join(__dirname, '..', pak.source),
},
},
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module-resolver',
{
extensions: ['.js', '.jsx', '.json'],
alias: {
[pak.name]: path.join(__dirname, '..', pak.source),
},
},
],
],
],
};
49 changes: 24 additions & 25 deletions example/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,34 @@ const pak = require('../package.json');
const root = path.resolve(__dirname, '..');

const modules = Object.keys({
...pak.peerDependencies,
...pak.peerDependencies,
});

module.exports = {
projectRoot: __dirname,
watchFolders: [root],
projectRoot: __dirname,
watchFolders: [root],

// We need to make sure that only one version is loaded for peerDependencies
// So we block them at the root, and alias them to the versions in example's node_modules
resolver: {
blacklistRE: exclusionList(
modules.map(
(m) =>
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
)
),
// We need to make sure that only one version is loaded for peerDependencies
// So we block them at the root, and alias them to the versions in example's node_modules
resolver: {
blacklistRE: exclusionList(
modules.map(
m => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`),
),
),

extraNodeModules: modules.reduce((acc, name) => {
acc[name] = path.join(__dirname, 'node_modules', name);
return acc;
}, {}),
},
extraNodeModules: modules.reduce((acc, name) => {
acc[name] = path.join(__dirname, 'node_modules', name);
return acc;
}, {}),
},

transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
8 changes: 4 additions & 4 deletions example/react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const path = require('path');

module.exports = {
dependencies: {
'react-native-key-command': {
root: path.join(__dirname, '..'),
dependencies: {
'react-native-key-command': {
root: path.join(__dirname, '..'),
},
},
},
};

0 comments on commit 3a476cb

Please sign in to comment.