Skip to content

Commit

Permalink
[core] Batch small changes (mui#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Aug 3, 2020
1 parent 39fcc40 commit 936a278
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ module.exports = {
'react/no-array-index-key': 'off', // This rule is great for raising people awareness of what a key is and how it works.
'react/no-danger': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'off', // Required for backward compatibility. TODO v5, drop
'react/require-default-props': 'off', // Not always relevant
'react/sort-prop-types': 'error',
// This depends entirely on what you're doing. There's no universal pattern
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
.idea
.vscode

__diff_output__
.DS_STORE
*.log
/.eslintcache
/.nyc_output
/coverage
dist
node_modules
__diff_output__
5 changes: 4 additions & 1 deletion packages/grid/data-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@
"setupFiles": [
"<rootDir>/src/setupTests.js"
],
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc"
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc",
"engines": {
"node": ">=8.0.0"
}
}
5 changes: 4 additions & 1 deletion packages/grid/x-grid-data-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,8 @@
"setupFiles": [
"<rootDir>/src/setupTests.js"
],
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc"
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc",
"engines": {
"node": ">=8.0.0"
}
}
8 changes: 2 additions & 6 deletions packages/grid/x-grid-modules/src/models/gridOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ export interface GridOptions {
*/
logLevel?: string | false;
/**
* Set the sort model of the grid
*
* Set the sort model of the grid.
*/
sortModel?: SortModel;
/**
Expand Down Expand Up @@ -231,8 +230,7 @@ export interface GridOptions {
/**
* Handler triggered when one or multiple rows get their selection state change.
*
*
* @param param With all properties from [[SelectionChangeParams]]
* @param param With all properties from [[SelectionChangeParams]].
*/
onSelectionChange?: (param: SelectionChangeParams) => void;
/**
Expand All @@ -250,14 +248,12 @@ export interface GridOptions {
/**
* Handler triggered when the current page has change.
*
*
* @param param With all properties from [[PageChangeParams]].
*/
onPageChange?: (param: PageChangeParams) => void;
/**
* Handler triggered when the page size change.
*
*
* @param param With all properties from [[PageChangeParams]].
*/
onPageSizeChange?: (param: PageChangeParams) => void;
Expand Down
5 changes: 4 additions & 1 deletion packages/grid/x-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@
"setupFiles": [
"<rootDir>/src/setupTests.js"
],
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc"
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc",
"engines": {
"node": ">=8.0.0"
}
}
5 changes: 4 additions & 1 deletion packages/license/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@
"setupFiles": [
"<rootDir>/src/setupTests.js"
],
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc"
"gitHead": "f1d56176bb6308bb55c69f5c2fd5593c4e4faebc",
"engines": {
"node": ">=8.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/license/src/verifyLicense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { base64Decode, base64Encode } from './encoding/base64';
import { md5 } from './encoding/md5';
import { LicenseStatus } from './licenseStatus';

export const generateReleaseInfo = () => {
export function generateReleaseInfo() {
const today = new Date();
today.setHours(0, 0, 0, 0);

return base64Encode(today.getTime().toString());
};
}

const MUI_DOMAINS = [
'https://muix-preview.netlify.app/',
Expand All @@ -19,7 +19,7 @@ const isOnMUIDomain = () =>

const expiryReg = /^.*EXPIRY=([0-9]+),.*$/;

export const verifyLicense = (releaseInfo: string, encodedLicense: string) => {
export function verifyLicense(releaseInfo: string, encodedLicense: string) {
if (isOnMUIDomain()) {
return LicenseStatus.Valid;
}
Expand Down Expand Up @@ -66,4 +66,4 @@ export const verifyLicense = (releaseInfo: string, encodedLicense: string) => {
}

return LicenseStatus.Valid;
};
}

0 comments on commit 936a278

Please sign in to comment.