Skip to content

Commit

Permalink
Merge branch 'refactor/v3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed Mar 7, 2023
2 parents 49418d1 + 1e32934 commit 6a85fa6
Show file tree
Hide file tree
Showing 472 changed files with 34,838 additions and 22,290 deletions.
8 changes: 0 additions & 8 deletions .ci/config/popper.js

This file was deleted.

5 changes: 5 additions & 0 deletions .ci/config/snapshot-resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
testPathForConsistencyCheck: 'TextField/index.test.js',
resolveSnapshotPath: (path, ext) => path + ext,
resolveTestPath: (path, ext) => path.slice(0, -ext.length),
};
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
node_modules
dist
coverage
examples
old
storybook-static
39 changes: 23 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
module.exports = {
extends: ['@poool/eslint-config-react'],
overrides: [{
files: ['packages/**/*.test.js'],
env: {
jest: true,
overrides: [
{
files: ['packages/**/*.test.js'],
env: {
jest: true,
},
},
}, {
files: ['packages/junipero-native'],
extends: ['@poool/eslint-config-react-native'],
}],
{
files: ['packages/junipero-native'],
extends: ['@poool/eslint-config-react-native'],
},
{
files: ['packages/**/*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
globals: {
JSX: 'readonly',
React: 'readonly',
},
rules: {
// function params are considered as unused vars
'no-unused-vars': 0,
},
},
],
rules: {
// regex cannot be concatenated
'max-len': [1, { ignoreRegExpLiterals: true }],
Expand All @@ -19,13 +34,5 @@ module.exports = {
// Common props are not checked anyway
'react/prop-types': [2, { ignore: ['className', 'children'] }],
'react/react-in-jsx-scope': 0,

// Directly assigning this.state is sometimes required in addition to
// setState
'react/no-direct-mutation-state': 0,

// this.state.opened ? this.close() : this.open()
// is a false positive
'babel/no-unused-expressions': 0,
},
};
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [master,develop]
branches: [master,develop,refactor/v3]
pull_request:
branches: [master,develop]

Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ coverage
.ci
.github
.storybook
old
2 changes: 1 addition & 1 deletion .storybook/index.styl → .storybook/index.sass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../packages/junipero/lib/index"
@use "../packages/theme/lib/index"

body
padding: 20px
Expand Down
36 changes: 35 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ const path = require('path');
const autoprefixer = require('autoprefixer');

module.exports = {
stories: ['../packages/**/*.stories.js'],
stories: [
'../packages/*/lib/*/*.stories.js',
],
addons: [
'@storybook/addon-storysource',
'@storybook/addon-actions/register',
'storybook-dark-mode',
],
core: {
builder: 'webpack5',
Expand All @@ -14,6 +17,10 @@ module.exports = {
config.resolve.modules = ['node_modules', path.resolve('./node_modules')];
config.resolve.alias = {
'react-native': 'react-native-web',
'@junipero/core': path.resolve('./packages/core/lib'),
'@junipero/react': path.resolve('./packages/react/lib'),
'@junipero/hooks': path.resolve('./packages/hooks/lib'),
'@junipero/transitions': path.resolve('./packages/transitions/lib'),
};

config.module.rules.push({
Expand Down Expand Up @@ -41,6 +48,33 @@ module.exports = {
],
});

config.module.rules.push({
test: /\.sass$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
sourceMap: true,
plugins: [autoprefixer],
},
},
},
{
loader: 'sass-loader',
options: {
sassOptions: {
includePaths: [
path.resolve('./packages/theme/lib/utils'),
],
},
},
},
],
});

return config;
},
};
2 changes: 1 addition & 1 deletion .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
14 changes: 13 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
import './index.styl';
import { themes } from '@storybook/theming';

import './index.sass';

export const parameters = {
darkMode: {
dark: { ...themes.dark, appBg: '#181818', appContentBg: '#1A1A1A' },
darkClass: 'dark',
light: { ...themes.light, appBg: '#FEFEFE', appContentBg: '#FEFEFE' },
classTarget: 'html',
stylePreview: true,
},
};
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 6a85fa6

Please sign in to comment.