-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e83642
commit fc4e638
Showing
339 changed files
with
19,744 additions
and
15,928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
presets: [ | ||
'@babel/react', | ||
'@babel/flow', | ||
['@babel/env', { modules: false, loose: true }], | ||
], | ||
plugins: [ | ||
['@babel/proposal-class-properties', { loose: true }], | ||
['@babel/proposal-object-rest-spread', { loose: true }], | ||
// used for stripping out the `invariant` messages in production builds | ||
'dev-expression', | ||
], | ||
comments: false, | ||
}; | ||
|
||
if (process.env.NODE_ENV === 'test') { | ||
module.exports.plugins.push('@babel/transform-modules-commonjs'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
module.exports = { | ||
extends: [ | ||
'prettier', | ||
'airbnb', | ||
'plugin:flowtype/recommended', | ||
'prettier/react', | ||
'prettier/flowtype', | ||
'plugin:jest/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
parser: 'babel-eslint', | ||
plugins: ['prettier', 'flowtype', 'react', 'import', 'jest'], | ||
env: { | ||
es6: true, | ||
browser: true, | ||
node: true, | ||
'jest/globals': true, | ||
}, | ||
globals: { | ||
// flow globals | ||
TimeoutID: true, | ||
IntervalID: true, | ||
AnimationFrameID: true, | ||
}, | ||
rules: { | ||
// Error on prettier violations | ||
'prettier/prettier': 'error', | ||
|
||
// New eslint style rules that is not disabled by prettier: | ||
'lines-between-class-members': 'off', | ||
|
||
// Allowing warning and error console logging | ||
'no-console': ['error', { allow: ['warn', 'error'] }], | ||
|
||
// Opting out of prefer destructuring (nicer with flow in lots of cases) | ||
'prefer-destructuring': 'off', | ||
|
||
// Disallowing the use of variables starting with `_` unless it called on `this`. | ||
// Allowed: `this._secret = Symbol()` | ||
// Not allowed: `const _secret = Symbol()` | ||
'no-underscore-dangle': ['error', { allowAfterThis: true }], | ||
|
||
// Cannot reassign function parameters but allowing modification | ||
'no-param-reassign': ['error', { props: false }], | ||
|
||
// Allowing ++ on numbers | ||
'no-plusplus': 'off', | ||
|
||
// Allowing Math.pow rather than forcing `**` | ||
'no-restricted-properties': [ | ||
'off', | ||
{ | ||
object: 'Math', | ||
property: 'pow', | ||
}, | ||
], | ||
|
||
// Allowing jsx in files with any file extension (old components have jsx but not the extension) | ||
'react/jsx-filename-extension': 'off', | ||
|
||
// Not requiring default prop declarations all the time | ||
'react/require-default-props': 'off', | ||
|
||
// Opt out of preferring stateless functions | ||
'react/prefer-stateless-function': 'off', | ||
|
||
// Allowing files to have multiple components in it | ||
'react/no-multi-comp': 'off', | ||
|
||
// Sometimes we use the PropTypes.object PropType for simplicity | ||
'react/forbid-prop-types': 'off', | ||
|
||
// Allowing the non function setState approach | ||
'react/no-access-state-in-setstate': 'off', | ||
|
||
// Opting out of this | ||
'react/destructuring-assignment': 'off', | ||
|
||
// Adding 'skipShapeProps' as the rule has issues with correctly handling PropTypes.shape | ||
'react/no-unused-prop-types': ['error', { skipShapeProps: true }], | ||
|
||
// Require // @flow at the top of files | ||
'flowtype/require-valid-file-annotation': [ | ||
'error', | ||
'always', | ||
{ annotationStyle: 'line' }, | ||
], | ||
|
||
// Allowing importing from dev deps (for stories and tests) | ||
'import/no-extraneous-dependencies': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "all", | ||
"semi": true, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
{ | ||
"dist/react-beautiful-dnd.js": { | ||
"bundled": 400507, | ||
"minified": 151621, | ||
"gzipped": 43147 | ||
"bundled": 350983, | ||
"minified": 131579, | ||
"gzipped": 36875 | ||
}, | ||
"dist/react-beautiful-dnd.min.js": { | ||
"bundled": 358937, | ||
"minified": 134847, | ||
"gzipped": 38228 | ||
"bundled": 311656, | ||
"minified": 114427, | ||
"gzipped": 31353 | ||
}, | ||
"dist/react-beautiful-dnd.esm.js": { | ||
"bundled": 177889, | ||
"minified": 89747, | ||
"gzipped": 22655, | ||
"bundled": 180447, | ||
"minified": 92592, | ||
"gzipped": 22949, | ||
"treeshaked": { | ||
"rollup": 78234, | ||
"webpack": 80006 | ||
"rollup": { | ||
"code": 68627, | ||
"import_statements": 668 | ||
}, | ||
"webpack": { | ||
"code": 70911 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
"@babel/react", | ||
"@babel/flow", | ||
["@babel/env", { "modules": false, "loose": true }] | ||
], | ||
"plugins": [ | ||
["@babel/proposal-class-properties", { "loose": true }], | ||
["@babel/proposal-object-rest-spread", { "loose": true }] | ||
], | ||
"comments": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Babel | ||
|
||
storybook looks for a root `.babelrc` in the project for its babel config. However, we are using `.babelrc.js` which is not supported. Rather than putting effort into this we are just having a custom `.babelrc` in this folder which is the same as `.babelrc.js`. This is lame, but we are looking to move away from storybook in the short term anyway. | ||
|
||
- [Storybook babel docs](https://storybook.js.org/configurations/custom-babel-config/) | ||
- [Storybook issue for supporting `babelrc.js`](https://github.com/storybooks/storybook/issues/2582) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Changelog | ||
|
||
This project adheres to [Semantic Versioning 2.0](http://semver.org/). | ||
All release notes and upgrade notes can be found on our [Github Releases](https://github.com/atlassian/react-beautiful-dnd/releases) page. | ||
All release notes and upgrade notes can be found on our [Github Releases](https://github.com/atlassian/react-beautiful-dnd/releases) page. |
Oops, something went wrong.