Skip to content

Commit

Permalink
Merge pull request #897 from jbetancur/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
jbetancur authored Sep 7, 2021
2 parents b55131b + 8511560 commit c247903
Show file tree
Hide file tree
Showing 262 changed files with 47,242 additions and 36,816 deletions.
47 changes: 0 additions & 47 deletions .babelrc

This file was deleted.

31 changes: 0 additions & 31 deletions .circleci/config.yaml

This file was deleted.

15 changes: 5 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
# http://editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
charset = utf-8
indent_style = tab
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
coverage
storybook-static
102 changes: 44 additions & 58 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,46 @@
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'plugin:jsx-a11y/recommended'],
plugins: ['jest', 'react-hooks', 'jsx-a11y'],
rules: {
'max-len': 0,
'react/forbid-prop-types': 0,
'import/no-extraneous-dependencies': 0,
'no-confusing-arrow': ['error', { allowParens: true }],
'arrow-parens': ['error', 'as-needed'],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'import/prefer-default-export': 0,
'object-curly-newline': ['error', { consistent: true }],
'implicit-arrow-linebreak': 0,
'operator-linebreak': 0,
'linebreak-style': 0,
'arrow-body-style': 0,
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'react/jsx-props-no-spreading': 0,
},
env: {
'jest/globals': true,
browser: true,
},
settings: {
'import/resolver': {
'babel-module': {},
},
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
env: { browser: true, es6: true, node: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly' },
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: { jsx: true },
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
'comma-dangle': ['error', 'always-multiline'],
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/interface-name-prefix': 0,
},
settings: { react: { version: 'detect' } },
},
],
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
plugins: ['jest', '@typescript-eslint'],
extends: [
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
rules: {
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
// '@typescript-eslint/ban-ts-comment': [{ 'ts-ignore': 'allow-with-description', minimumDescriptionLength: 10 }],
'prettier/prettier': [
'error',
{
singleQuote: true,
},
],
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
},
overrides: [
{
files: ['**/*.js', '**/*.jsx'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'react/display-name': 'off',
},
},
],
};
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=lf
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ typings/

# dist
dist/*
!dist/index.js

# Storybook
storybook-static
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
semi: true,
jsxBracketSameLine: false,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 2,
arrowParens: 'avoid',
};
10 changes: 8 additions & 2 deletions .storybook/base.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
html {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
html,
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
}

table {
width: 100%;
}
11 changes: 0 additions & 11 deletions .storybook/main.js

This file was deleted.

37 changes: 37 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const prettierConfig = require('../.prettierrc.js');

module.exports = {
stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx|mdx)'],
addons: [
{
name: '@storybook/addon-storysource',
options: {
loaderOptions: {
prettierConfig: prettierConfig,
injectStoryParameters: false,
},
},
},
{
name: '@storybook/addon-docs',
options: {
sourceLoaderOptions: {
injectStoryParameters: false,
},
},
},
{
name: "@storybook/addon-essentials",
options: {}
},
{
name: "@storybook/addon-a11y",
options: {
runOnly: {
type: "tag",
values: ["wcag2a", "wcag2aa"]
}
}
},
],
};
14 changes: 14 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { create } from '@storybook/theming';
import { addons } from '@storybook/addons';

addons.setConfig({
isFullscreen: false,
showAddonsPanel: true,
panelPosition: 'bottom',
theme: create({
base: 'light',
brandTitle: 'React Data Table Component',
brandUrl: 'https://github.com/jbetancur/react-data-table-component',
gridCellSize: 12,
}),
});
20 changes: 0 additions & 20 deletions .storybook/preview.js

This file was deleted.

26 changes: 26 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import "./base.css";

export const parameters = {
// controls: { expanded: true },
viewMode: 'docs',
options: {
storySort: {
method: 'alphabetical',
order: ['Getting Started', ['Introduction', 'Installation', 'Basic Examples', 'Kitchen Sink', 'Code of Conduct', 'Features & Issues', '*'], 'API Reference', ['Columns', 'Properties'], 'Columns', 'Sorting', 'Selectable', 'Expandable', 'Pagination', 'Headers', 'Loading', '*', 'Performance', ['Optimization', '*'], 'Contributing'],
},
},
a11y: {
element: "#root",
config: {},
options: {},
manual: true,
},
};

export const globalTypes = {
theme: {
name: 'Theme',
description: 'Global theme for components',
defaultValue: 'light',
},
};
8 changes: 4 additions & 4 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended",
"stylelint-config-styled-components"
],
"rules": {
"declaration-colon-newline-after": null,
"value-list-max-empty-lines": null,
"value-keyword-case": null
},
"syntax": "scss"
"value-keyword-case": null,
"indentation": "tab"
}
}
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ deploy:
token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
local_dir: storybook-static
on:
branch: master

branch: next
after_script:
- yarn codecov
Loading

0 comments on commit c247903

Please sign in to comment.