Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old eslint-ignores from unstable_ prefix #10740

Merged
merged 1 commit into from Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/next/export/worker.js
Expand Up @@ -118,9 +118,7 @@ export default async function({
let curRenderOpts = {}
let renderMethod = renderToHTML

// eslint-disable-next-line camelcase
const renderedDuringBuild = getStaticProps => {
// eslint-disable-next-line camelcase
return !buildExport && getStaticProps && !isDynamicRoute(path)
}

Expand Down
Expand Up @@ -10,7 +10,6 @@ export default class UrlPropChange extends React.Component {
}
}

// eslint-disable-next-line camelcase
componentDidUpdate(prevProps) {
if (prevProps.url !== this.props.url) {
this.setState(() => {
Expand Down
Expand Up @@ -2,7 +2,6 @@ import Link from 'next/link'
import fs from 'fs'
import findUp from 'find-up'

// eslint-disable-next-line camelcase
export async function getServerSideProps() {
const text = fs
.readFileSync(
Expand Down
@@ -1,7 +1,6 @@
import React from 'react'
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getServerSideProps({ query }) {
return {
props: {
Expand Down
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'

// eslint-disable-next-line camelcase
export async function getServerSideProps({ params }) {
if (params.post === 'post-10') {
await new Promise(resolve => {
Expand Down
1 change: 0 additions & 1 deletion test/integration/getserversideprops/pages/blog/index.js
@@ -1,7 +1,6 @@
import React from 'react'
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getServerSideProps() {
return {
props: {
Expand Down
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'

// eslint-disable-next-line camelcase
export async function getServerSideProps({ params }) {
return {
props: {
Expand Down
@@ -1,6 +1,5 @@
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getServerSideProps() {
return {
props: {
Expand Down
1 change: 0 additions & 1 deletion test/integration/getserversideprops/pages/index.js
@@ -1,6 +1,5 @@
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getServerSideProps() {
return {
props: {
Expand Down
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'

// eslint-disable-next-line camelcase
export async function getServerSideProps({ params, query }) {
return {
world: 'world',
Expand Down
1 change: 0 additions & 1 deletion test/integration/getserversideprops/pages/something.js
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'

// eslint-disable-next-line camelcase
export async function getServerSideProps({ params, query }) {
return {
props: {
Expand Down
@@ -1,7 +1,6 @@
import React from 'react'
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getServerSideProps({ query }) {
return {
props: {
Expand Down
@@ -1,11 +1,9 @@
import React from 'react'

// eslint-disable-next-line camelcase
export async function getStaticPaths() {
return { paths: [{ params: { slug: 'hello' } }], fallback: true }
}

// eslint-disable-next-line camelcase
export async function getStaticProps({ params }) {
return {
props: {
Expand Down
@@ -1,11 +1,9 @@
import React from 'react'

// eslint-disable-next-line camelcase
export async function getStaticPaths() {
return { paths: [{ foo: 'bad', baz: 'herro' }], fallback: true }
}

// eslint-disable-next-line camelcase
export async function getStaticProps({ params }) {
return {
props: {
Expand Down
2 changes: 0 additions & 2 deletions test/integration/prerender-legacy/pages/blog/[post].js
@@ -1,11 +1,9 @@
import React from 'react'

// eslint-disable-next-line camelcase
export async function unstable_getStaticParams() {
return ['/blog/post-1']
}

// eslint-disable-next-line camelcase
export async function getStaticProps({ params }) {
return {
props: {
Expand Down
1 change: 0 additions & 1 deletion test/integration/prerender/pages/another/index.js
Expand Up @@ -2,7 +2,6 @@ import Link from 'next/link'
import fs from 'fs'
import findUp from 'find-up'

// eslint-disable-next-line camelcase
export async function getStaticProps() {
const text = fs
.readFileSync(
Expand Down
2 changes: 0 additions & 2 deletions test/integration/prerender/pages/blog/[post]/[comment].js
@@ -1,7 +1,6 @@
import React from 'react'
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getStaticPaths() {
return {
paths: [
Expand All @@ -12,7 +11,6 @@ export async function getStaticPaths() {
}
}

// eslint-disable-next-line camelcase
export async function getStaticProps({ params }) {
return {
props: {
Expand Down
2 changes: 0 additions & 2 deletions test/integration/prerender/pages/blog/[post]/index.js
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'

// eslint-disable-next-line camelcase
export async function getStaticPaths() {
return {
paths: [
Expand All @@ -19,7 +18,6 @@ export async function getStaticPaths() {

let counter = 0

// eslint-disable-next-line camelcase
export async function getStaticProps({ params }) {
if (params.post === 'post-10') {
await new Promise(resolve => {
Expand Down
1 change: 0 additions & 1 deletion test/integration/prerender/pages/blog/index.js
@@ -1,7 +1,6 @@
import React from 'react'
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getStaticProps() {
return {
props: {
Expand Down
1 change: 0 additions & 1 deletion test/integration/prerender/pages/default-revalidate.js
@@ -1,6 +1,5 @@
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getStaticProps() {
return {
props: {
Expand Down
1 change: 0 additions & 1 deletion test/integration/prerender/pages/index.js
@@ -1,6 +1,5 @@
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getStaticProps() {
// throw new Error('oops from getStaticProps')
return {
Expand Down
1 change: 0 additions & 1 deletion test/integration/prerender/pages/something.js
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'

// eslint-disable-next-line camelcase
export async function getStaticProps({ params }) {
return {
props: {
Expand Down
2 changes: 0 additions & 2 deletions test/integration/prerender/pages/user/[user]/profile.js
@@ -1,12 +1,10 @@
import React from 'react'
import Link from 'next/link'

// eslint-disable-next-line camelcase
export async function getStaticPaths() {
return { paths: [], fallback: true }
}

// eslint-disable-next-line camelcase
export async function getStaticProps({ params }) {
return {
props: {
Expand Down